November 2, 200421 yr I'm trying to export a file from our FileMaker-based POS to send to the University's PeopleSoft finance system. One of the requirements is "a sequential number starting with 1 for the first line and incremented by 1 for each subsequent line" -- i.e. a line number. This wouldn't be a serial number stored within the record (each record already has one) but would be within the found set (the first found record is 1, the second in the found set is 2, etc). Is there a way to do this? I looked at the status functions and couldn't see anything that looked like it would work. I could write a script that would loop through each record, setting a numeric field to the value of the previous record's field + 1, but I'd like to do something cleaner if possible.
November 2, 200421 yr You could create an UNSTORED calculation field, Status(CurrentRecordNumber), then export that. It would of course only be the same for that particular found set. So what happens next time you export, and the records start with 1 again? I can't imagine that's what they want; but I don't know. If they want a "unique" sequential number, that's a different thing. You could do it with a loop; but you'd have to go check what the last export ended with. Tip for loops: View as Form, much faster.
November 2, 200421 yr Author Brilliant! That worked perfectly. I had actually tried Status(CurrentRecordNumber) earlier but had forgotten to make it unstored.
Create an account or sign in to comment