How to reset sequence number start value to 0?

Comments

3 comments

  • Avatar
    AgilePoint NX Support

    Hi Valerie,

    Currently, is the AgilePoint application is in Development Environment?

    If yes, moving the application to the production environment will auto-reset it to "1" without doing any changes in the eForm, Believing that both Dev & Prd Databases are different.

    Thanks

    0
    Comment actions Permalink
  • Avatar
    Aravind Rajanna

    Hi Valerie,

    We understand that you have a sequence number control implemented inside your eForm and while in development phase there are around 315 sequence number has got generated and you want it to be reset before moving it to production environment. Assuming that your production and development environment are different , whenever you migrate your app from development to production there is no need to reset the sequence number going since you are deploying the app newly in a fresh environment any new sequence number which gets generated in production environment it would start from 0. So there is no explicit reset required.

    If you still have a requirement to reset the sequence number you can do it directly at the database level using below query:
    https://docs.microsoft.com/en-us/sql/t-sql/statements/alter-sequence-transact-sql?view=sql-server-ver15

    SELECT * FROM sys. Sequences ALTER SEQUENCE [Sequence Number Column Name] RESTART WITH 000

    Sequence Number Column Name – Format of this would be [Process Model Name_Field Internal Name]

    Note : Resetting of sequence number is not at all recommended action once you go live. If even by mistake if you reset the sequence number all your new request start to fail because of reset sequence number start from beginning and form submit primary key violation might fail. So take decision wisely on resetting sequence number and try this first on your development or staging environment.

    Thanks

    0
    Comment actions Permalink
  • Avatar
    vd

    Hi, thank you for the response!  The number did reset once we moved into the new environment.  I have just posted another question though regarding how to only increment the number when the form is submitted.

    0
    Comment actions Permalink

Please sign in to leave a comment.