2 Replies Latest reply: May 31, 2013 4:37 AM by sm*290887*m7 RSS

    auto sequence numbering

    sm*290887*m7
      Hi all,

      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
      post;
      end if;

      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);
      end if;

      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.

      Regards,
      Lim