Alteryx Designer Desktop Discussions

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

Retrieving column headers to populate list box in following app

leonhekkert
8 - Asteroid

Hi,

 

I need to retrieve all column headers so I can use these for dynamically selecting them in the next chained app.

Currently I'm using a lot of tools for this and I have the feeling I'm making it more complex than necessary.

 

 

Example.png

 

  1. Currently I transpose the dataset so I get the headers in the column 'name'. 
  2. Then I add a record ID because I do not want to sort the headers which will happen in step 3.
  3. I groupby the headers twice. One which I will name 'NAME' and another named as 'VALUE'. I also add the min record count.
  4. Sort on the minimum record count so the original order is back
  5. Loose the minimum record count column.

How could I simplify this?

3 REPLIES 3
Nick-C
Alteryx
Alteryx

Hi @leonhekkert 

You could use a select tool and then click "Metadata" on the results pane rather than "Data" - not sure what your next stage is but the metadata output can be fed into a list-box, drop-down etc 

 

NickC_0-1655818553195.png

If this works for you - please do hit "Accept as solution" 

DataNath
17 - Castor
17 - Castor

@leonhekkert not sure if this is suitable for your requirement. However, if so it'll trim a couple of tools off:

 

- Transpose as you have

- Make Value = Name

- Output this list with NAME & VALUE fields

- Reference this in your list box configuration by selecting the 'External Source' method under List Values (can use a relative path)

 

If not, I tend to use your method when I have the same requirement (though without the sort/select as my order never seems to be precious), so I'm curious to see if there are better and more efficient ways!

leonhekkert
8 - Asteroid

@DataNath 
I did the transpose and then the formula tools (value = name) as you suggested. But then there are a lot of duplicates that I need to eliminate.

So used an unique tool but unfortunately this one also automatically sorts alphabetically so then I would still need the record, sort and select tools. :|

 

I already use the reference method that you mentioned. :)

Labels
Top Solution Authors