I have the auto sequence define for the purpose to give auto numbering when the record is being created. I have defined it at block level of when-new-record-instance with script below :-
if :system.record_status = 'NEW' then
if :system.form_status = 'CHANGED' then
select TO_char(SYSDATE,'MM')||TO_CHAR(SYSDATE,'yy')||'-'|| TO_CHAR(act_qt_seq.NEXTVAL) into :ACT_QT_MST.QM_NO FROM DUAL;
set_record_property(to_number(:system.trigger_record),'ACT_QT_MST', STATUS, NEW_STATUS);
I need to show user when they first created the document what are the number is running but sometimes if the user just call the program hence I have defined in the when-new-record-instance, but if user exit the program and without enter anything then the number is wasted again. It is particularly become an issue because of the gap in the number defined.
how to treat this ? anyone please help me. Thanks.
When I used when-database-record, my field does not shown automatically, hence I have put in the item trigger for when-item-validate, but still the same problem when the gap numbering appear if user exit the form without saving.