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!

Tool Mastery

Explore a diverse compilation of articles that take an in-depth look at Designer tools.
Become a Tool Master

Learn how you can share your expertise with the Community

LEARN MORE

Tool Mastery | Radio Button

AndrewL
Alteryx
Alteryx
Created
Radio Button.png

This article is part of the Tool Mastery Series, a compilation of Knowledge Base contributions to introduce diverse working examples for Designer Tools. Here we’ll delve into uses of the Radio Button Tool on our way to mastering the Alteryx Designer:

 

The Radio Button Tool can be used in a number of ways. This is a simple tool to configure but can be very powerful!

 

Use Case 1: Interface Clean up

You've just built an app and there are some option steps involved. Your interface works exactly how you want but it just looks a bit messy with all of the questions displayed. So how do you clean it up so you only show what is necessary depending on a user's selections? Radio Button to the rescue!

 

One of the many uses of the Radio Button is to collapse groups of questions unless the button is selected. Using the Interface Designer you can nest questions under other questions to create this set up:

 

Before: After:

UnNested.jpg Nested.jpg

 

In the Action Tool for the "Yes" radio button be sure to choose the option to "collapse group when deselected". Doing this creates the following interface:

 

No selected: Yes selected:

Collapsed.jpg Expanded.jpg

 

The attached v11.7 sample "CollapseGroup.yxwz" demonstrates this configuration.

 

Use Case 2: Disable Containers

This particular use case for the Radio Button tool can take many forms, including controlling the flow of data or blocking off entire sections of an Analytic App depending on the user's selection. There are a couple of different ways you can set this up, I prefer to do it the way some would consider backwards. This is because I'm using the Action from the selected Radio Button to disable the container for the opposite Radio Button. I find this tends to work more reliably than trying to disable all the containers by default and enabling them using radio buttons.

 

First, add your radio buttons and connect them to your tool container via the lightning bolt connector. Note that in my set up in the screen shot below, I have the Radio Button for Input A connected to the Tool Container for Input B. There is a reason for this that we'll get to in just a bit:

Disable_Workflow.jpg

From here, configure your Action tool. Note that the default option selected is "Enable/Disable Container from Question":

 

Disable_Action.jpg

 

Be sure to leave your Tool Containers enabled by default within your workflow for this arrangement to work properly. The easiest way to see the effect when one of the Radio Buttons is selected is to use the Debug mode in the Interface Designer. The Debug mode allows you to configure test inputs and then view how your Interface tools and Action tools pass those values to the tools they are connected to. For this example, If I select I want to use Input A, in the Debug workflow, you'll see the Tool Container for Input B is disabled:

Debug_DisableB.jpg

For more details on the exact configurations, take a look at the v11.7 "DisableContainer.yxwz" sample attached.

 

By now, you should have expert-level proficiency with the Radio Button Tool! If you can think of a use case we left out, feel free to use the comments section below! Consider yourself a Tool Master already? Let us know at community@alteryx.com if you’d like your creative tool uses to be featured in the Tool Mastery Series.

 

Stay tuned with our latest posts every#ToolTuesdayby following@alteryxon Twitter! If you want to master all the Designer tools, considersubscribingfor email notifications.

Attachments