Sequential numbering script in form field
I am trying to create a senario where everytime a user opens a master form, a number is generated sequentially in the REPORT NUMBER field.
I tried to run the script pictured below, but it's not what I need.

- The only number that needs to change in the field is the number just before the -023.
- The user intends to track of this report in this format: 016-23 translating to the 16th report of 2023.
- If possible, I'd like for the report number to change each time the user opens the form.
Brainstorming:
- User opens master document
- The generated number appears in the "REPORT NUMBER" field e.g. 016-023
- The user completes the form then saves a copy on computer under "NDT-016-023".
- When the document "NDT-016-023" is reopened, I would like the REPORT NUMBER to change to 017-023.
Can anyone advise a possible solution for this?
Thank you!
