1
0
-1

Hi experts,

I have tried counter increment tool to reset ID everyday. but this does not works. May I know, where am I wrong?

    CommentAdd your comment...

    1 answer

    1.  
      1
      0
      -1

      Hi Nadh,

      To fulfill your requirement, try using this as your Environment Variable Name.

      #date.dd-mm-yyyy#_counter

      With the use of date hash variable, every day since the date changes, a new environment variable will be created for the new date and hence also having a fresh counter value.

      For the "Reset value when value exceeds" property, just leave this property blank.

      Hope this helps!

      1. Nadh

        Should I need to put the hash variable in variable name?

        #date.dd-mm-yyyy#_pass_no

        This is my code since I want to reset the pass_no.. then I'll try to submit form again. The pass_no still not being reset to 001
      2. Chris Angel

        Try attaching a minimal, verifiable, replicable sample app, or post a screenshot with explanation. Your explanation is vague.

        And yes, your variable name seems to be correct. 

      3. Nadh

        This is my counter increment tool. I have follow as Justin suggested. 

        but my pass_no still does not reset to 1. It still increase by 1. 

      4. Chris Angel

        Try attaching a minimal, verifiable, replicable sample app, so I can check out to see if there's a misconfiguration in the app.

      5. Nadh

        how can I get my replicable sample app? Can you teach me? Sorry I am new here... A lot of things I am still dunno how to do..

      6. Ian

        So what Chris Angel means is: create a new app with only the relevant fields that are causing the issue. Once you've created the app, in App Design, go to Properties & Export and click on the Export button. You'll download the app with a .jwa extension. Once that is done, upload it here. 

        On a future note, it's also a good best practice to also provide steps to replicate the issue.

      7. Danial Jefri

        Hi


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


      8. Chris Angel

        Hi Danial,

        You don't need to create the environment variable beforehand. Simply key in this value with hash variable in "Variable Name" property in Counter Increment Tool. The plugin will auto generate the environment variable.

      9. Danial Jefri

        Hi Chris

        Thanks. It's working now. 

        But I have another question. How do I start the counter 1 instead of 0. 

        I have already initial counter value as 1, but it still starts at zero. I want it to be like the red numbering.


        In addition, it is possible to add text before the environmental variable? for example:
        Row1 → CMR-01

        Row2 → CMR-02

        Row3 → CMR-03

      10. Chris Angel

        Hey Danial,

        Unfortunately I don't know enough about your app design to give further advice. Do export a simple app that replicates your issue above and attach it here.

      CommentAdd your comment...