We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Radio button to Select Month and get Number of month.

DavidGonzalez_93
5 - Atom

Hi Community,

I’m working on an interactive app where I need to create an interface that allows users to select a month of the year with radio buttons. Based on their selection, I’d like to return the corresponding number of the month (e.g., January = 1, October = 10).

Does anyone have suggestions on the best way to implement this?

Thanks in advance!

4 REPLIES 4
binuacs
21 - Polaris

@DavidGonzalez_93 instead of radio button use the drop down tool where you can manually add month name  and month number  (name and value)

DavidGonzalez_93
5 - Atom

Yes, that was actually my initial idea. However, we’re currently working with Alteryx Server 2024.1, and for some reason, the values in the dropdown tool are not populating correctly. That’s why I decided to switch to using radio buttons instead.

Gaurav_Dhama_
12 - Quasar

Can you tell whats wrong in drop down tool?

 

Alternatively, you can just get the selection from user and match it with a prefixed list [input Text] and then append the output to your data and use the column.

 

Another approach, All action tools connecting to same location, use

if [#1] THEN (corresponding number) ELSE “” ENDIF.

 

What will happen is that only the radio button which is true will update its value, rest will just pass empty string/nothing.

DavidGonzalez_93
5 - Atom

Hi Dhama,

Thanks for your suggestion!

Regarding the dropdown issue: it worked fine on my desktop, but when I published the workflow to the server, it stopped retrieving data. I was using the External Source option in the List Values, with a query to populate the dropdown. However, I realized that on the server, the dropdown only displays manually entered values. So, I switched to using a static list instead, and that solved the problem.

Also, I tried your idea with the radio buttons just out of curiosity, and it worked perfectly! 

Thanks again for sharing your approach!

Labels
Top Solution Authors