AnsweredAssumed Answered

export as individual records with unique file names... 23.csv, 24.csv, 25.csv, etc.

Question asked by dsmith99 on Jan 26, 2015
Latest reply on Jan 26, 2015 by philmodjunk

Title

export as individual records with unique file names... 23.csv, 24.csv, 25.csv, etc.

Post

Hello FM Forum.

I have a FM database of 1000 records, and will do a found set, and now have 200 records and each has a record number.

I do not want to do one export and have a file with 200 records. I want a script that cycles through the 200 found set and does 200 separate exports to .CSV. As is, when you are done it will not work because the file name is "Untitled.csv" and it will want to overwrite each time.

I want each individual export to end up in the same desktop folder and the script to auto-generate a unique file extension based on the record number within each record and use it in the file name.... record number115.CSV, so I will end up with 200 separate files, each with one record and named by the unique record number.

Is this possible? I tried to use the set variable command before the export command but could not figure it out?

Thanks, Doug in Los Angles

Outcomes