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

Question

Question

IF THEN STATEMENT: If radio button choice is Yes, then (fill this field with) variable

asked on March 25, 2020

Can you help me with this calculation?  I need a single line field to populate based on a radio button choice.  Something like:

  • If radio button choice is Yes, then (fill this field with) variable1
  • If radio button choice is No, then (fill this field with) variable2
  • If radio button choice is Needs Revision First, then (fill this field with) variable3

 

I haven't done an if then statement like this, could someone help me with how it would be put together?

1 0

Answer

SELECTED ANSWER
replied on March 25, 2020 Show version history

My mistake, I thought you simply wanted the text "variable1" etc. in the field. In that case, this should work if you deselect the "assign values to choices" (or if you have them, use those instead):

=IF(Radio_Button_Variable="Yes",variable1,IF(Radio_Button_Variable="No",variable2,IF(Radio_Button_Variable="Needs Revision First",variable3,)))

The if statements are the same as Excel (if you know those) in that you need to nest them, so for IF(conditional, true, false) with the false being another if statement.

3 0

Replies

replied on March 25, 2020

Hi Connie,

A simple solution is to assign those variable names to the choices themselves

and then you can simply have the single line field =Radio_Button_Variable.

0 0
replied on March 25, 2020

I looked at that, Jim, but it doesn't allow me to pick from variables, which led me to believe it doesn't work that way.  Wrong assumption?

What I need to put in there is from three hidden fields that have been populated with what is needed to send off the next task to the right user.  I found I couldn't use the name picked out of a drop down list (someone helped me with that on another Answers post), I needed the variable to hold the ORG\cprendergast data instead of my name as Connie Prendergast in order to get the next task to successfully assign the next task.

The hidden fields are populated from drop-down fields, but via a lookup that replaces the person's name with the converted format and holds that version for use in assigning tasks.

2 0
SELECTED ANSWER
replied on March 25, 2020 Show version history

My mistake, I thought you simply wanted the text "variable1" etc. in the field. In that case, this should work if you deselect the "assign values to choices" (or if you have them, use those instead):

=IF(Radio_Button_Variable="Yes",variable1,IF(Radio_Button_Variable="No",variable2,IF(Radio_Button_Variable="Needs Revision First",variable3,)))

The if statements are the same as Excel (if you know those) in that you need to nest them, so for IF(conditional, true, false) with the false being another if statement.

3 0
replied on March 25, 2020

Thanks, Jim!  I believe I have this working now!

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

Sign in to reply to this post.