Retrieving column headers to populate list box in following app
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
- Currently I transpose the dataset so I get the headers in the column 'name'.
- Then I add a record ID because I do not want to sort the headers which will happen in step 3.
- I groupby the headers twice. One which I will name 'NAME' and another named as 'VALUE'. I also add the min record count.
- Sort on the minimum record count so the original order is back
- Loose the minimum record count column.
How could I simplify this?
- Labels:
- Apps
- Preparation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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
If this works for you - please do hit "Accept as solution"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@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!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@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. :)
