0

"Display field only, if" with multiple choice

Hi!

I need to show field if some options of multi choice was chosen (one or two or even three)

I tried to use chosen function:

chosen('multi choice field') => ["Option 1", "Option 2"]

but it actually doesn't work even with one option

Here how I use script:

 

The function "Display field only, if" works with this script

 

and multi options starts to work in this script, but...

 

But, there are no logic of options numbers. They don't correspond not to the order of my options or not to the id of my options. I just try to put any numbers and see if it works or no, and in some cases it works

I try to use this not to a siple field, but to for a link to another table, may be that's the problem?

 

Or why this chosen function doesn't work? Where am I incorrect?

5 replies

null
    • EYELAB
    • Maria
    • 4 yrs ago
    • Reported - view

    I tried chosen with other fields... No way 

    chosen('multi choice field') => ["Option 1", "Option 2"]

    doesn't work

    • Ninox partner
    • RoSoft_Steven.1
    • 4 yrs ago
    • Reported - view

    Try: 'multi choice field'>0

    • EYELAB
    • Maria
    • 4 yrs ago
    • Reported - view

    Try: 'multi choice field'>0
     

    I need different options, not just > 0

    For example, I have 8 options and 8 fields on each of them I nead to make "display if" determined by chosen multi option

    For the first field that would be in case of chosen 1 or 1 and 2 options

    For the second field if chosen 2 or if chosen 2 and 3 options

    For the 5th field ih chosen 5th or 5 and 1 or 5 and 3 options

     

    And problem is, when I use 1 and 2 options, they correspond to options in multi choice field. But for the 3rd option in multi choice field I need to use number 4 in function... And after for the 4th option I use number 8

    And after 8 nothing works for other 4 fileds

     

    I can't find rules by what that works

    • Sean
    • 4 yrs ago
    • Reported - view

    You need to use the still undocumented numbers() function. Even if you were using the chosen() function you would need to combine it with other functions to make the comparison because both numbers() and chosen() return arrays. One way to do it is like this...

     

    contains(concat(numbers(YourMCField)), "2")

    • EYELAB
    • Maria
    • 4 yrs ago
    • Reported - view

    Thank you, Sean!

    Seems this works!

Content aside

  • 4 yrs agoLast active
  • 5Replies
  • 1019Views