Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

This topic is 6162 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I have a typical auto-enter unique serial number field in a table that has data copied and erased at the end of the day. The new day starts with a new record and I need to set the serial number back to 1. It would be better if this were done via a script but I could live with doing it manually.

Thanks for your help

Posted

If you wish to replace the serial daily, then why use a serial at all; why not just let the record number serve as the serial?

The purpose of a serial is to make a unique ID which can be used mainly to tie related records together. Do you not have related records? Erasing (and reusing) records would not allow any trail of history. It might help to know the purpose of your table.

Posted

Your right, of course, I misspoke. I am actually using a transaction number that is auto-enter serial number and increased by 1 for each new transaction. It doesnt NEED to be a serial number just a auto enter starting at 1 and increasing by 1 for each new transaction. There could be 100s of transactions in one day but once the day is finished the data is printed, saved and done for. The next morning we start over again fresh with the transaction number back to 1, with a new date. This is a POS solution by the way. How would I set up a calculation/script that would give me the progressive numbers for each transactio and something else I can use to delete same at the end of the day?

Thanks

Posted

You will undoubtedly receive a few different options for this challenge, but I believe, as a first thought here, I would tie it into a script for new record. If no other records exist for this date then start numbering from 1 or whatever. It could be a search with or without a set global field to new date or number to simplify the next new record search, and then sort to find last record number so you can add 1 to it.

Do you also delete records from previous dates?

Posted

I just want to save the data from one day to the next in the form of an Excel spreadsheet. I will never have a need for the data generated that day to be used again in FMP it is history. Why I even need the record number field is so we will know thru the day how many transactions (customers} we have had and a summary report at the end of the day will show the transactions including a transaction number associated with each record. There is never a need to find on record number.

I could even start with a fresh database for each day but I have tables as lookups that would have to be repopulated each day...not a good solution.

Thanks

Posted

I think the simplest way would be to reset the serial at the same time you delete the day's records. Roughly, a script of:

Go to Layout

Show All Records

Delete All Records

Set Next Serial Value

Posted

Please give me the best way... a calculation on a field?... a script ...that will start me off at 1 at the beginning of the day, will increment by 1 for each additional record. Will show as a field in my daily report that is also printed and is deletable at the end of the day.

Thanks

This topic is 6162 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.