Retrieving values in Dynamic Choice field
New user here - exploring the potential for Ninox to help me with a fairly simple database task. But I’m now getting into it!
In Table-A, I have successfully populated a DynamicChoice field called “Instructor” with Names, Colours and Icons from a separate table (table-B). I now want to use the values in a Styled(…) statement in order to use that colour/icon chosen in calendar appointments.
All worked fine when the field was previously a simple choice field - I could successfully use:
Styled(text, color(Instructor), color”black”, icon(Instructor))
BUT, now the same field name is a Dynamic Choice Field and I am unable to write an error-free reference to “Instructor”.
How do I reference color ands icon result from the dynamic choice selected?
Thanks in anticipation from a new SQL/Ninox/code-writing student (aged 71!)
5 replies
-
So it looks like color() doesn't like dynamic fields.
What you can do is create two new formula fields (recColor and recIcon) in the root table of the dynamic field. Then copy the code from the dynamic field into their appropriate fields, plus making any modifications as necessary. I try not to name fields that have the same name as Ninox commands.
This will allow you to:
1) use the record() command to get the record and then reference the color and icon fields.
2) update the dynamic color and icon formulas to point at the new fields instead of putting in the code.
Content aside
- 2 days agoLast active
- 5Replies
- 38Views
-
2
Following