Announcements
Hi ,
I have Created one number sequence and assigned to a field. My requirement is when i Press the Save button in the form then only it should be inserted in a table. Otherwise the generated number sequence should not be saved.
Regards,
Ram
Hi Ram,
I think the continuous option will be fine for this as Nikolaos adviced.
Curious about which country as I have seen many European countries have this requirement for audit purpose.
The number sequence Next value must be updated when the value is fetched. It can't be updated only when your user saves the record. Otherwise you would get a conflict if two users were creating records in this table at the same time:
1) User A creates a record and gets nr 1 from the sequence. The record is not yet saved.
2) User B creates a record and gets nr 1 from the sequence. The record is saved.
3) User A tries to save, but it fails because there already exists a record with nr 1.
But, you can set the number sequence to Continuous, then it will reuse the discarded values. This is heavy for performance and should only be activated if there's a legal requirement to have a continuous sequence without gaps.
Do you have a legal requirement behind this? Or why do you not want to have gaps in the numbers?
Hi Ramit Paul,
I have created a new Table named _PPAPHist table. There is one Field called PPAPID. The number sequence should be created for this Field, I have created a new number sequence for that. The generated number sequence should be saved only when i Press save button in the form.Otherwise it should not be saved. For eg: if i entered a new line with generated number seq "1". Only it should be stored when i press save button. If i not pressed Save and closed the form. The number sequence should be start with 1.
Regards,
Ram
Isn't it handled by NumberSeqFormHandler automatically?
If you're not aware of NumberSeqFormHandler, please consult Number Sequence Framework > Using Number Sequences in an Application.
HI Ram,
Can you give us more info in which field you are adding the num sequence?
It is hard to share some solution with the above info you shared.
André Arnaud de Cal...
293,998
Super User 2025 Season 1
Martin Dráb
232,850
Most Valuable Professional
nmaenpaa
101,158
Moderator