Create column using field name from another column
- 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
I have one column of data - the column name identifies the month/year the data corresponds to.
How do I create another column with one unique value, being the field name of the first column?
Solved! Go to Solution.
- Labels:
- Preparation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
you can use a Field Info tool (Developer category) to generate a list of all your field names. Since your table only has one, you can simply Append (Join category) the name to your existing table.
If this misses the mark, please share an example of what your desired output should look like.
Best,
Jimmy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
UPDATE: I found a solution to the below. I changed the options on the Source Data Template so it assumed Row 1 was data and then used a multi-field formula to generate a new column.
@jrgo thanks for your help, that works nicely.
However, now I have done it for one tab in one file, how do I achieve the same for multiple tabs in one file? Each tab has one column with a different column name (each tab is one month of data).
I have a dynamic input tool to merge the data from all the tabs together, but I end up with one column with the field name from the tab I chose as the Source Data template in the dynamic input tool
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Glad to hear you found an alternative!
I was actually going to suggest a batch macro because I was thinking you wanted each sheets placed side by side instead of all in one column. But if all in one column, yes, that’s the ideal solution!
Not sure how what your expressions looks like in your MultiRow tool to have it know when it needs to get a new header vs copy the previous, but if you also configure your Input tool to output the FULL PATH as a field, you can use that as a grouping field to ensure it resets correctly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I used this (the column names start with "00", the real data starts with something else
