"Display field only, if" multiple-choice field is = 1
Hi Support
You provided me with the below function if I wanted to display a field only if "multiple-choice field is 1"
choose('multiple choice field',"Value")
I have tried to use this function but I keep getting this error -
Function is not defined: choose(multi,number) at line 1........
Any assistance?
9 replies
-
I'm not official support, but the function is chosen(multi, number).
-
For what it is worth, the function chosen(multi, number) returns a Boolean value. So it will return true if field 1 is chosen, but it will also return true if other values are chosen as well as field 1. The way to single out just one chosen value is with this formula
text(chosen(multiField)) = "yourValue"
-
Thanks Sean,
That worked!
-
WaElisa and Steve
I'm new to Ninox and am attempting to code a similar Display If Function,can you please share the exact code used in your function? I'm gettign an error when I try and use the function you mentioned above?
Thanks
-
Hi,
You have to replace the multiField with the name of your Multiple Choice field
and the "yourValue" with the text that is written in the choice of that field.
In other parts the formula is correct, as long as you use also a Multiple Choice field. If you use a simple Choice field please drop the choosen and belonging brackets ().
Best, Jörg
-
There is the big weakness with Ninox,---> documentation on NX language and examples DONT EXIST. Example to illustrate: WHERE in the doc will you find this: "chosen(multi, number)" - refering to "chosen"? Is it part of the syntax?
-
Off-grid, here is a link to the language reference...
https://ninoxdb.de/en/manual/calculations/reference-of-functions-and-language
Use command+f to search for that function on the page.
-
Here is my (one of them) problem. I try to make a calculation by using a switch function to pull out a text value out of a multi-choice field, do the calculation and put the result into another field. Problem is to pull out that value. I've seen some use of brakets in the forum, but NONE in the language referense. That is what I mean by saying language reference i somewhat useless.
-
That would be quite a switch statement. I'm not a math wiz, but there would a lot of possible combinations with just 5 items in your multiple choice field.
You would use the chosen() function to get the selected values of the multiple choice field. It returns an array with the values. You can also use the numbers() function to get an array of the chosen item's index.
Content aside
- 5 yrs agoLast active
- 9Replies
- 4635Views