Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Macro radio button update a value

tmonroe
7 - Meteor

I have what  I thought would be an easy option in my macro. Typically I will have a formula Type="XX" and using a text box input, The action tool will replace the "XX" with the text box value.  Is there a way to do that with a radio button.  I have tried if [#1] then "High" else "Low" endif within the update value with formula.  This is not working.  I believe there must be an easy option to update the value.  I only have two radio buttons labeled 'High" (#1) and "Low" (#2).  

4 REPLIES 4
CharlieS
17 - Castor
17 - Castor

Hi @tmonroe 

 

Could you elaborate on "This is not working"? The error message you receive will help diagnose the specific issue. One possible issue would be the quote wrapping in the Action expression. Try this:

 

IF [#1] THEN '"High"'
ELSEIF [#2] THEN '"Low"'
ELSE '"XX"' ENDIF

 

Notice that I placed an extra set of single quotes around the value to use. This is because we need the expression to be "High" and the single quotes are used to escape the value (including quotes) from the IF statement.

 

Check out the attached workflow for an example of this in action and an alternative interface option that uses a Drop Down tool. 

tmonroe
7 - Meteor

Thanks for the input. I did try adding the single quotes around the data, but still not working.  When I say it is not working, the initial "XX" is coming out as the value of the field.  This is the action that I have.  

tmonroe_0-1583256088428.png

 

 

 

CharlieS
17 - Castor
17 - Castor

In the Action configuration, select the next line down that says "expression - value = "XX"". That way the formula you entered will update the expression value and you should be good. 

tmonroe
7 - Meteor

Thank you.  That worked. I originally had that but i kept getting an error.  I believe the double quotes within the single quotes was my issue.  Thanks again.

 

Labels