Hi, I am creating a note pad and want to name each page (or record) in this format: YYYY_MMDD_serial number
(this number is not the ID, just the name I show on the print)
The serial number restarts each day on 1.
The page name field is created with a calculation that gets the current date in the format I want & the field Images::_Image_serialnumber. So far so good.
I have created a button to create a new record with a script:
Go to Layout ["Images" (Images)]
Go to Record/Request/Page [last]
If [Images::Date_created ≠ Get (CurrentDate)]
Set Next Serial Value [Images::_Image_serialnumber; 1 ]
That works fine, but:
Besides my own button on a layout, FM also has a 'New Record" button on the tool bar and menu.
Using these buttons to create a new record obviously does not initiate my script.
Question: how do I set it up that my field Images::_Image_serialnumber uses my script (or resets each day) for each new record, even when I use the tool bar or menu buttons?