Hi everyone!
I am currently facing an issue regarding an app built. The issue that I have is that this app outputs a XLSX file and some fields of that output are unknown and that it depends of what the user is specifying in the window app.
I would like to be able to sort those fields that are unknown at the time of building the workflow but that will appear once the app is ran.
Is anyone aware of how I could achieve this? I am open to any possibilities as this would be an important feature of the app itself.
Thank you all!
Solved! Go to Solution.
@camillb See if the attached works. You add a textbox and name all of the fields that you want. You connect that to a select to make sure the datatype is what you want. You connect that to a union. Then your connect your original data to the union. Then you would put a select and re order the fields. Then you would disconnect the first select from the union.
This is basically what the ensure fields macro is doing if you have the crew macros.
How many fields can they choose from? If it's say, 10 fields, perhaps the easiest thing to do is make 10 dropdown fields where they can select any of the fields, or "None". then another 10 dropdown fields to choose between Ascending or Descending.
Then have a regular macro sort Field1-Field10. Each pair of dropdowns (field + asc/desc) will connect to one of the sorts and change the field and order it sorts by.
Put detours around each of the sorts, if they choose "None" then detour around that sort so it doesn't do anything.
That's the best approach I can think of. If you just use a listbox or something, I have a hard time seeing how you'd be able to sort in a *specific order* of the fields, as you can in a regular sort tool when you're sorting multiple fields