• Resolved invisiblesy

    (@invisiblesy)


    Hi again. It seemed like a dumb question, but I can’t figure it out.

    Let’s say, I have a checkboxes field (fieldname123) with “1”,”2″ and “3” options. I need to create a condition that works if the user selects “1”. If I write IF(fieldname123==1,…) it works if the user selects option “1” only. But it doesn’t work if he selects, for example, both “1” and “2”. What condition should I write to make the function work if the user selects a certain option, no matter if he selects other ones or not?

    Thanks in advance.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter invisiblesy

    (@invisiblesy)

    Alright, I resolved it by myself by creating condition IF(MIN(fieldname123<2),…,…) and it works for me.

    • This reply was modified 2 years, 5 months ago by invisiblesy.
    • This reply was modified 2 years, 5 months ago by invisiblesy.
    Plugin Author codepeople

    (@codepeople)

    Hello @invisiblesy

    Actually, there is a better solution. Using the field’s name with the |r modifier (for raw mode) in the equations allows you to access an array with values of ticked choices.

    Then you can implement equations as follows:

    IF(IN(1, fieldname123|r), 'The choice A is selected', IF(IN(2, fieldname123|r), 'The choice B is selected', ''))

    Best regards.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Checkboxes value for multiple choices’ is closed to new replies.