I have a report with many fields / columns that output to an Excel sheet. Prior to running the report, I want to enable the users to choose which order they want the fields / columns within the designer interface.
I'm already using the select tool, with the list box & action tools, to enable users to select which fields they want outputted in the Excel file, but this option does not allow them to choose the order. Having a pre-set order does not fit the needs, as each user will need a different order.
Any thoughts on how to accomplish this?
Solved! Go to Solution.
macro input with field mapping?
Have you looked at this thread and the solution/macros by @patrick_digan
Hi @jessebrand ,
I'm not aware of a simple solution there and the solution I'm going to propose is not a pretty one.
You would need to use a chained app, where the user select the fields first and the next app would show the following:
https://community.alteryx.com/t5/Interactive-Lessons/Chaining-Analytic-Apps/ta-p/243120
You will need to have a drop down tool for each possible column (which means 100 drop-downs if 100 possible columns - that's why, not pretty) and leave as 'none' if not needed as image below.
Your action tool would be configured to update raw xml
And you would need to update the raw xml of the select tool, that looks like this:
And the idea here is for you to reorder the selectfield somehow with each drop down tools available there.
It is possible but it would request a lot of effort to make it happen.
Another quick but not ideal way is for you to request the user to upload a template with the header and then use it to order your dataset.
Best,
Fernando Vizcaino
Stick with the macro input/field mapping and only allow the user to re-order fields of the same type?
@apathetichell Thank you for sharing that thread. It's an interesting option, but does not solve the ask. The Alteryx report I'm working on will be published to a private Alteryx web server. Similar to allowing the users to input a date from & to, the report should allow the users to choose the order of their fields / columns in the same interface that they would input their desired date ranges and other parameters.
Is it possible to get some generalized data and more concrete examples of the things you want?
@fmvizcaino Thank you! I hope the Alteryx development team adds a tool to make this more simplistic, but it sounds like this approach will work well for the users' needs. I think I'll be able to create what you have below, but would you be willing to share an example workflow as a reference?
Hi @jessebrand ,
Here is a example of reordering your data, it was a bit simpler than I thought it would be.
Keep in mind that you need to use chained apps to dynamically generate the drop down list and the input file.
I agree with you that it would be great to have a simple way of doing this, for that, I suggest you to post an idea here:
https://community.alteryx.com/t5/Alteryx-Designer-Ideas/idb-p/product-ideas
Best,
Fernando Vizcaino