You are viewing limited content. For full access, please sign in.

Question

Question

IF THEN STATEMENT with checkbox variables

asked on October 26, 2023

I need a gateway to go take an alternate path if a specific choice was made in a checkbox.  I understand that you cannot use "contains" in the programming of the conditions... I can pick equals or does not equal, greater than or less than, but I cannot pick "contains".

So, then I thought I could have a hidden field with a formula in it where if the variable I wanted was checked off, that field would be "Yes".  That way I can point the Gateway to that field and if it says Yes go one way, if it is empty, go the other way.  

So, this is my formula, but it's not working.  Can you tell me why?

=IF(Targeted_Field_Name="Choice_3_Variable", "Yes", "")

0 0

Answer

SELECTED ANSWER
replied on October 26, 2023

Try this:

 

Your gateway can be programmed like this:

/dataset/variable_name/checkbox_value="checked"

 

And you can use checkbox values in formulas like this:

=IF(variable_name.checkbox_value = "TRUE", truecondition, falsecondition)

1 0
replied on October 27, 2023

Jennifer, I was excited to try this, however, it is suspending saying the outflow conditions may be incorrect and yet the process validation says it's fine this way:

/dataset/I_would_like_to_Subscribe_Unsubscribe/Economic_Development_and_Business_Resources="checked"

 

0 0
replied on October 27, 2023 Show version history

Connie, if you want to jump on a call to look at it together, let me know.

0 0
replied on October 27, 2023

Sure!  What do you need?

replied on October 27, 2023

Shoot me an email at blake.smith@fichebait.com.

0 0
replied on October 27, 2023

Thank you, Blake!  Turns out it was just a wrong variable name that it was pointing to.

1 0
replied on October 27, 2023

Thank you, Jennifer!  This worked... turns out I had a wrong variable name in there, but once that got changed, it worked:  /dataset/variable_name/checkbox_value="checked"

1 0

Replies

replied on October 27, 2023

As Jennifer said above, you can add conditions in the gateway for what you want to be selected with a checkbox field. If you need to evaluate based on more than one checkbox field value, you can add an OR option or an AND option to the condition for a specific path.

1 0
You are not allowed to follow up in this post.

Sign in to reply to this post.