1
0
-1

Hi

 

Similar to what listenwell asked earlier this year in

ID Generator Field Counter change by year

 

Is there a way to reset the ID generator environment variable back to 0 when a year changes from 2017->2018.

2017|0017 

2018|0001

Is there a way to update the counter environment variable through Joget itself or would I need to use a database update tool or other tools to perform this action.

I have no problems changing the year, I only need to reset the counter every new year.

Thanks

 

    CommentAdd your comment...

    1 answer

    1.  
      1
      0
      -1

      i think you can use date hash variable in "Environment Variable Name" eg. "counter_#date.yyyy#". So, in each year a new Environment Variable is used to generate the id like following.

      counter_2017, counter_2018, counter_2019 & so on.

      1. John Smith

        The year is not the problem, I'm looking on a way to reset my counter to 0 after every year. As the rolling number will just keep continuing after from 2017->2018

      2. Anders

        Once the year changes, the counter will be reset because it is essentially using a different env variable name.

      3. Danial Jefri

        Hi panda


        I tried implement your method, however I cannot create the environment Variable Name with '#'. I am using version DX7 Enterprise Trial.

      CommentAdd your comment...