This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
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?
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.
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.
I configured it just like you have but it does not give an options to update the column names. I know I can map with a macro but I may have 5 columns coming in and 15 columns to choose from to rename it to. Thanks! Attached is the macro.
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.
So what you would have to do is make a drop down for each possible new name. The question would indicate the name they are changing it to and the action would update the old name field. So if you have fifteen options you would need fifteen drop downs.