Alteryx Designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
ALTER.NEXT:

Join us on Dec 2 for a half-day virtual analytics + data science event!
US & CA customers only

SAVE YOUR SPOT
It's the most wonderful time of the year - Santalytics 2020 is here! This year, Santa's workshop needs the help of the Alteryx Community to help get back on track, so head over to the Group Hub for all the info to get started!
SOLVED

Dynamically Select Fields based on results of DropDown Selection

Highlighted
9 - Comet

Hi, struggling with a challenge.

 

I have a table with 16 fields.

 

e.g. 

 

Fund1, Fund2, Fund3, Fund4, etc.

 

I have a drop down with 

Fund1

Fund2

Fund3

Fund4

 

I'd like my dropdown selection to dynamically select the relevant columns. Does anyone have a solution to this?

 

Help much appreciated. 

Highlighted
Alteryx
Alteryx

I think you'd want to use a list box rather than a drop down.

 

The list box will allow you to have a check box per column, rather than the single option the drop down allows.

 

If you set the list box to accept the field list from your input tool/stream this will load those fields.

 

Like the attached (if you rename to .yxwz).

Highlighted
9 - Comet

Thanks. The List Box to MultiSelect does work. I guess I can comment "Please only select one'. 

 

Was thinking as it's a one - to - one relationship - So when I pick fund 1, i only need the fund 1 column back. 

 

 

Highlighted
Alteryx
Alteryx

Ah sorry, I misunderstood.

 

You can connect the drop down in the same way as the list box if you want the user to only select one.

 

I would never rely on the user to only select one 😉

Highlighted
16 - Nebula
16 - Nebula

You can do this by feeding the Question output into a Dynamic Select and then using a formula to choose which columns to keep.

clipboard_image_0.png

 

Quick sample based on @JoeS attached

 

One slight warning - remember to tick:

clipboard_image_0.png

as the field output changes...

Highlighted
9 - Comet

Think i worked it out - [Name]=[#1]

 

 

 

Highlighted
9 - Comet

@jdunkerley79 @JoeS 

New issue, is that as the fields are being dynamically selected in the dropdown of the app. A lot of my downstream tools aren't functioning now, especially summarise tools. 

 

What is the best way to cope with this changing upstream field situation?

 

I can share a sample workflow or screenshots if that would help more?

Highlighted
Alteryx
Alteryx

Hi @CiaranA 

 

Yeah, it'd be best to share your workflow.

 

I'd guess that you may need to change the shape of your data using the transpose tool before a summarize and then a cross tab after.

 

But definitely best if you can upload your example 🙂

Highlighted
9 - Comet

Would this be better as a chained app?

 

I've attached a sample which aims to show that by dynamically picking a fund, your downstream tools then reference that fund's particular data, pivot it up and summarise in a table. 

Highlighted
7 - Meteor

@jdunkerley79 

I have a query how to add a DROPDOWN feature into a batch macro so that i can dynamically input only 1 field.

Below i have described my situation, please help me out

  • I have multiple database connections (read: for multiple markets), but the field names that i want to extract is same.
  • So i built a batch macro which runs for all the connections but i dont need all connections at the same time instead i want only one connection (Market) to run at a time.

So, can i somehow built a dropdown to select a particular connection before running the workflow. 

 

Labels