Select tool ordering of fields. Is there a way to keep the fields from changing order?
- 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
Hi,
I run my workflow on a server. and different months are chosen each time (see photo)
now i ran it locally and before my select tool the fields are in order.
After they the select tool ran , they get shifted to the end (some of them)
why is this happening? Is there a way to keep the months chosen grouped together?
Solved! Go to Solution.
- Labels:
- Custom Tools
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
You'll likely need a macro. I have this issue with a workflow I run monthly where the fields would get out of order. Take a look at the below macro flow. It uses a Field Info tool with a record ID tool to set the order of the fields. Then it concatenates the Record order to the Field names and cross tabs it. Once Cross tabbed it uses the Dynamic Rename tool to rename the column headers in the appropriate order and removes the Sort Order prefix.
Ignore the Lower Input tool and Union as I am also grabbing field names from another file to add into this one.
You can also try out the CReW Field Sort macro.
http://www.chaosreignswithin.com/2014/08/field-sort-macro.html
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
posting specific example -
problems:
1) 20221031 should come before 202211
2) Is it possible to insert the date columns between "folder" and "test" dynamically?
ie from
201031 | folder | test |
to
folder | 20221031 | test |
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
To solve the 20221031 issue, add a Record ID tool after your filter and concatenate the Record_ID to the Name field. This will preserve the field order. As for putting the 20221031 between the Folder and Test, will 2021031 always be the field name or is it dynamic and can change?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@cjaneczko ok thanks! u solved my issue #1!
20221031 can change.. its dynamic.. ie
my output is this
20221031 | 202211 | 202212 | etc | etc | etc | etc | col 1 | col 2 | col 3 |
could be any dates in the first 3 columns there.
Need a way to insert it affter a certain column...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Which columns are always first and static? Where do you need the 3 date columns? And what is after those 3 Dynamic Date columns. You will likely need a couple field info tools and some Multi Row Formulas to accomplish it. You'll essentially need to create some Record ID's with the multi Row Formula. The Record ID can capture the fields that will always be static. Then use the Multi Row formula to create a Record_ID count that starts after the number of fields that are Static. So if you have 4 fields in the front that are static use Record ID to count 1-4. Then use the Multi Row formula to create a Record ID starting from 5 onward. Union all these together to get the fields in the correct order based on the Record ID's and then Cross tab then like you've already done.
You may also need a sample tool to dynamically grab the first three dynamic date records.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Is this the output you are looking for?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@cjaneczko yes that is the output. not sure if you can alter my workflow to get this...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@cjaneczko thanks! u the man!! testing it more thoroughly now..
