Auto-generate Number

  • 17 October 2016
  • 4 replies
  • 5 views

Badge +11

Hello Guys,

I have been given the NWF file attached, which generates a reference number based on ID.
However, I am unable to reset the ID number sad.png 

Therefore, maybe someone can help me to modify the current file as following:

- start counting from 0
- also it should start from 0 for each new year.

e.g 1600001 | 1700001 | 180001

Can you support me please?


4 replies

Badge +1

I was able to do this creating a new column. Then in workflow that runs when item is created I run a query list to get the highest list id # and then I math operation to add some value like 5000 or whatever. I also do another action and add a prefix to my new column's value. That is a read only field on the form that everybody sees not the list id. This allows you to modify the value added to change where your sequence is in the future, either lower or higher.screen shot of mine

Badge +11

hmmm not sure, if you understood my point!!
I do not want the ID number to take into consideration because I cannot reset it.

I rather want it to start "your own index auto-num" based on the year 16 / 17 / 18
example  160001 | 170001 etc.


Anyway, would you be able to share the autonum .nwf file for me to test it?
I have attached mine, see the first message.

Maybe you could modify it ?

Badge +1

You're right, I didn't. However you could still use the idea and use the fn-FormatDate({WorkflowVariable:MyDate}, "yy") and add your # to the end of it. If your date value is today it will give your the current year. I also attached my wf file.

Badge

Hi

 

I am still a "beginner", but I am trying to build a WF exactly like you described (user submit a change request via form.  After "submit", WF needs to auto generate a "Req#").  Any chance could you provide a screenshot of the configurations for your steps?  THANKS!

Reply