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.
Hello, I was wondering if there was a way to set the fields in my output as Strings of varying max field lengths without having to go into the Select Tool and set each field length manually. Sometimes I have 250+ fields and it can be time consuming and error prone! I'd rather have these values in an Excel file or some other table where I can cut and paste from the file format document and then verify that they are correct before uploading. I set these field lengths before outputting the data in FLAT fixed width file format. I'm attaching an image of my select tool.
Here's a completely dynamic solution that uses the Dynamic Metadata macro available in the excellent Crew Macro Pack.
The example I provided reads the metadata from the Name, Type and Length columns in the excel file and uses these to change the size of the input data
In order to use this, you'll have to download and install the entire Pack from the link, since the Dynamic Metadata macro uses some of the other macros included in the pack.
You may have reservations about using a set of 3rd party tools, but the pack contains a bunch of useful additions to the built-in tools and is highly regarded by the community. Of course, if IT has restrictions about using something like then all bets are off.
If you don't want to or can't use this macro, let me know and I'll see if I can't come up with something that provides similar, though probably less refined, functionality
Thank you! This does work and is definitely a possibility for file formats that don't change much from file to file- the only part that I can't still do easily is analyze the format data prior to uploading (meaning I want to make sure a certain field is starting in a certain position, etc). But definitely worth keeping as an option for some situations. I hadn't noticed the "Save Field Configuration" feature before in the Select Tool and didn't know how to modify those YXFT file types- so that was very helpful. Thanks for taking the time to help!
Thank you! This did the trick and wow- after having set all those field lengths manually, this did it in a snap. I'm looking forward to checking out the other capabilities with this macro as well. It was nice meeting you at Inspire 2019! Thanks again!