Querying multiple choice fields
Ninox Profile

Does Ninox script have a "contains" function?

I have a simple multiple choice field in which up to four options can be selected. In effect what I want the user to be able to do is filter records so that all those that have option A selected in that multiple choice field are listed together (no matter what other options are or are not selected) and likewise with options B, C and D. It seems to me I should be able to create an if/theh/else formula field that shows "all records where the multiple choice field contains A" - but I'm not sure how the contains function is scripted or even whether it exists! 


Ninox Profile

The funcion works like this:

if contains(chosen('your mulple choice field'), "A") then ... else ... end


Ninox Profile

OK, thanks Birger. That's helpful. Maybe add these functions to the Manual?  

Ninox Profile

This doesn't seem to work, though:

if contains(chosen('STORY TYPE'), "Humanitarian work") then "Humanitarian work" else null end

It returns "Function is not defined ... column 59". Adding text("H...) doesn't make any difference.

Ninox Profile

if contains(text(chosen('STORY TYPE')), "Humanitarian work") then
"Humanitarian work"

Ninox Profile

Brilliant. That does the trick. Many thanks!