• Resolved clonemykey

    (@clonemykey)


    Hello,

    I’m trying to hide several div boxes conditionally and I noticed there is a IGNOREFIELD() operation. Can this be used inside and IF statement? I’ve been playing around with it without success.

    – A

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author codepeople

    (@codepeople)

    Hello @clonemykey

    The IGNOREFIELD operation can be used in the equations similar to other operations in the plugin. However, be careful in no create an infinite loop.

    Best regards.

    Thread Starter clonemykey

    (@clonemykey)

    So something similar to the code below should be functional? fieldname27 is a slider with values 1-100.

    IF(fieldname27>=2,ACTIVATEFIELD(33),IGNOREFIELD(33));

    • This reply was modified 4 years, 1 month ago by clonemykey.
    Plugin Author codepeople

    (@codepeople)

    Hello @clonemykey

    In your equation was missed the close parenthesis at the end. However, I recommend you the use of the ternary javascript operator:

    
    (2<=fieldname27) ? ACTIVATEFIELD(33) : IGNOREFIELD(33);
    

    Best regards.

    Thread Starter clonemykey

    (@clonemykey)

    Thanks for this. The ternary JS code works. The closed parenthesis was just a copy and paste error. I can confirm my code still does not work. We’ll just switch to yours.

    Plugin Author codepeople

    (@codepeople)

    Hello @clonemykey

    Yes, please, use the alternative with the ternary operator.

    Best regards.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘IGNOREFIELD() using conditional statements’ is closed to new replies.