Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Auto assign a requisition / order number

Avatar

27-03-2009

We have made our Requisition form available in as a PDF. The problem we are having is that each requisition needs to have a unique requisition number so the customer has something to refer to when tracking the order.



Is there a way to set up the form to auto assign a unique number? This number could be tied to date and time just so that it generates an identifying number.

Replies

Avatar

Avatar
Boost 500
Level 10
pguerett
Level 10

Likes

611 likes

Total Posts

7,689 posts

Correct Reply

692 solutions
Top badges earned
Boost 500
Boost 50
Boost 5
Boost 3
Boost 250
View profile

Avatar
Boost 500
Level 10
pguerett
Level 10

Likes

611 likes

Total Posts

7,689 posts

Correct Reply

692 solutions
Top badges earned
Boost 500
Boost 50
Boost 5
Boost 3
Boost 250
View profile
pguerett
Level 10

06-04-2009

Yes ...there is a FormCalc function that will return the number of seconds form a point in time (called an Epoch). If you use the time() function it will return that number. As long as 2 users do not open th eform at exactly the same time then you can be guaranteed a unique number.

Paul

Avatar

Avatar
Validate 1
Level 1
hattg
Level 1

Likes

0 likes

Total Posts

10 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 1
hattg
Level 1

Likes

0 likes

Total Posts

10 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile
hattg
Level 1

29-04-2009

I found this thread on a search, as I have the same issue. Piggybacking on this question, this does work assigning a unique number, however for me, that PDF is e-mailed to another group as well as saved by the user. But now, when either of those people open that PDF, the number continues to incriment. Is there a way to make it not change once the PDF has been saved/e-mailed? My thought would be to make the entire form become read only, but I am not sure that would even fix it?

Avatar

Avatar
Boost 500
Level 10
pguerett
Level 10

Likes

611 likes

Total Posts

7,689 posts

Correct Reply

692 solutions
Top badges earned
Boost 500
Boost 50
Boost 5
Boost 3
Boost 250
View profile

Avatar
Boost 500
Level 10
pguerett
Level 10

Likes

611 likes

Total Posts

7,689 posts

Correct Reply

692 solutions
Top badges earned
Boost 500
Boost 50
Boost 5
Boost 3
Boost 250
View profile
pguerett
Level 10

30-04-2009

Do a check on the field to see if it is empty before doing the calculation. This way if the field is empty then the calc will fire...if there is already something in the field (presumably a form number) then it will not recalc.Something like this:

if (this.rawValue == null){

    do number calculation

}

Paul

Avatar

Avatar
Boost 5
Level 9
HowardTreisman
Level 9

Likes

5 likes

Total Posts

936 posts

Correct Reply

9 solutions
Top badges earned
Boost 5
Boost 3
Boost 1
Affirm 5
Affirm 3
View profile

Avatar
Boost 5
Level 9
HowardTreisman
Level 9

Likes

5 likes

Total Posts

936 posts

Correct Reply

9 solutions
Top badges earned
Boost 5
Boost 3
Boost 1
Affirm 5
Affirm 3
View profile
HowardTreisman
Level 9

30-04-2009

Another option is to inject a unique number into the form within the process itself.

This component generates a sequential number with optional prefix and suffix, and allow you to inject it into the form.

Doc: http://avoka.dnsalias.com/confluence/display/Public/Unique+ID+Generator+DSC

Download trial: http://www.avoka.com/avoka/escomponents.shtml

Howard

Avatar

Avatar
Coach
Level 10
Jasmin_Charbonn
Level 10

Likes

149 likes

Total Posts

2,154 posts

Correct Reply

97 solutions
Top badges earned
Coach
Give Back 1000
Give back 900
Give Back 800
Give back 600
View profile

Avatar
Coach
Level 10
Jasmin_Charbonn
Level 10

Likes

149 likes

Total Posts

2,154 posts

Correct Reply

97 solutions
Top badges earned
Coach
Give Back 1000
Give back 900
Give Back 800
Give back 600
View profile
Jasmin_Charbonn
Level 10

30-04-2009

You could inject the unique number from the process.

You can use the process variable /process_data/@id, which will give you an unique identifier for your instance.

Jasmin