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

Radio button enable/disable container

mst3k
11 - Bolide
I'm making an app with radio buttons to give 3 different paths of using the tool. I don't want to mess with blank inputs and other errors for the paths they aren't using since there's no inputs there. I thought I could do this by putting each path in a container in the workflow, then link the radio button to the container. What I want to happen seems logical - if that is the radio button they've selected, it should run that path (keep it enabled). Instead the action seems to work the exact opposite of what I want. It says "If the Check Box or Radio Button is selected, the Tool Container will be disabled". Why would you want to select a radio button choice to have it only DISABLE something? How could you even set up a 3 or 4 radio button question to perform different actions then? I don't see any option in the Action button to make it enable instead of disable, which would have been nice. Is the only option to disable all my containers, and then use the Action to update the "disabled" property to False instead of using the default action?
6 REPLIES 6
cplewis90
13 - Pulsar
13 - Pulsar

Hey @mst3k,

 

I had this same issue a few months ago when I was developing an app with 5 radio buttons and I wanted each to enable a container instead of disabling it. Essentially I had to build 4 actions for each radio button to disable all of the 4 other containers that I did not want to run for each radio button (total of 20 actions). I definitely think this is a great idea to be added to the ideas forum!

mst3k
11 - Bolide
The more buttons you add the more links you'd have to do exponentially or something like that right? Painful! For now I was able to get what I wanted by disabling every container, then from each radio button's Action tool I set it to "Update Value with formula" and changing the container's disabled property to "False" when the radio is selected. I still think this is the logical opposite of what you'd expect a radio button to do. I don't like having every container collapsed/disabled because it makes it harder to develop and debug the workflow, but I settled on that for now. Might be less painful for you than linking every radio to every other container
JosephSerpis
17 - Castor
17 - Castor

Hi @mst3k an alternative is you use a condition tool with your interface like below and this setup when the radio button is selected will enable the correct tool container.

Tool_Containers.PNG

tsmit593
5 - Atom

Hey @mst3k, I actually have a small change to your solution that lets you keep your containers open. If you update your formula to be the following, you get the correct functionality while being able to keep your containers enabled.

 

IF [#1] == "True" THEN "False" ELSE "True" ENDIF

 

It worked with my 3 radio buttons but I figure it should scale for any number.

Thanks for asking your question, it got me close enough to figure this out.

 

Action ConfigurationAction Configuration

Selection for DebugSelection for DebugResult of DebugResult of Debug

 

 
mst3k
11 - Bolide

awesome! I didn't even think of using an actual formula in the "update with a formula" option, just kept thinking of a string/literal. this is my first project working with the interface tools.

thanks!

richardhwlin
6 - Meteoroid

I did by using this formula: [#1] == "False"

Labels