I would like to create a dropdown list where the column names can be renamed. I want to give the user the option of picking the column name to rename from a dropdown box instead manually renaming it or indexing. Any ideas on what is the best route?
Solved! Go to Solution.
Hi mdata,
You would start by populating the dropdown with the fieldlist. The important thing there is to connect the q from the Macro Input, not the arrow connector.
Then you just have to set up a text input so that you have the old field name and new field name so that you can run it into the dynamic rename.
I've attached the Macro if that method doesn't make sense.
Kane
I have 2 file names here Named Book3 where macro input in coming from. The columns names in Book3 are incorrect but I want the user to pick and choose which columns names from file Column Names. I would like multiple dropdown boxes with all the column names from the Book3 and all the Columns Names from Columns Names file.
What I would like is all the column names of a file input in the dropdown box and be able to rename to any of the columns to right input file or text input. So if I have 8 coulmn names on the file coming in then there shuld be 8 drop down boxes with a matching right dropdown boxes. Left dropdown boxes would have all the possible column names with the input file file and the right dropdown boxes will have all the column rename from right file input or text input.
Hi mdata,
So, you won't be able to make the number of drop-downs be dynamic, however, you can replicate out the tools in that macro to make as many options as you would like.
Change the second input tool to a dropdown instead of a text input. Then connect a text input tool that has each column named with one of the options that you want the user to be able to choose from. Then replicate this and have each set update the next row in the text input tool that feeds into the dynamic input.
I've left the connectors on this screenshot, but you can replicate out those containers and then make the connections wireless.
Kane
So I am not sure that this will do it for you but you can map field names and this changes the name on output.
The catch with map field names is that the incoming data must have a field that will match in order for this to work. I am attaching an example of using field maps for addresses in both a macro and an app.
Note that fields that go into a macro that are beyond the scope of the mapping are left alone but fields that get mapped come out of the macro with your assigned names.
The Map fields wasnt selected in your attachment however the map method only works when you have more incoming fields than fields to map to... that is all fields have to be mapped to something.