Invoice Number Increment Shared Drive

Avatar

Avatar
Level 1
catherines19033
Level 1

Likes

0 likes

Total Posts

2 posts

Correct reply

0 solutions
View profile

Avatar
Level 1
catherines19033
Level 1

Likes

0 likes

Total Posts

2 posts

Correct reply

0 solutions
View profile
catherines19033
Level 1

21-12-2017

I have a form fillable PDF that is located on our website. It has two buttons, a PRINT and CLEAR. I also have a text field called InvoiceNumber. What I want is every time a user clicks the button PRINT, the InvoiceNumber text field increments and stays that number.

I made it the text field to increment using the following script:

var f = this.getField("InvoiceNumber");

f.value = Number(f.value)+1;

f.defaultValue = f.value;

BUT, when someone or the same one opens it up or refreshes the page, it goes back to a blank text field, then when that person clicks print it increments again.

I am wondering if there is a way to have a text field increment after a person prints the form, close it and when it opens again the number is the next number. Is this possible?

1378409_pastedImage_0.png

Accepted Solutions (0)

Answers (4)

Answers (4)

Avatar

Avatar
Boost 10
Level 3
altrue990
Level 3

Likes

10 likes

Total Posts

73 posts

Correct reply

14 solutions
Top badges earned
Boost 10
Give Back
Validate 1
Boost 5
Boost 3
View profile

Avatar
Boost 10
Level 3
altrue990
Level 3

Likes

10 likes

Total Posts

73 posts

Correct reply

14 solutions
Top badges earned
Boost 10
Give Back
Validate 1
Boost 5
Boost 3
View profile
altrue990
Level 3

21-01-2018

Access connectivity is not an internet ready solution (they will need access to the DB). If you really need to do this via internet, consider using a SOAP service or manually compose a REST call to get the current invoice number.

Avatar

Avatar
Validate 1
Level 4
MinusZero
Level 4

Likes

30 likes

Total Posts

326 posts

Correct reply

54 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 25
Boost 10
View profile

Avatar
Validate 1
Level 4
MinusZero
Level 4

Likes

30 likes

Total Posts

326 posts

Correct reply

54 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 25
Boost 10
View profile
MinusZero
Level 4

18-01-2018

I have had limited success connecting a database, but you can bind a field to a database so I think it would be possible.

Avatar

Avatar
Level 1
catherines19033
Level 1

Likes

0 likes

Total Posts

2 posts

Correct reply

0 solutions
View profile

Avatar
Level 1
catherines19033
Level 1

Likes

0 likes

Total Posts

2 posts

Correct reply

0 solutions
View profile
catherines19033
Level 1

18-01-2018

Is it possible to connect a PDF form to a Microsoft Access database using javascript? I want a read only text box on the form to get the autonumber field from Microsoft Access database I created.

Avatar

Avatar
Validate 1
Level 4
MinusZero
Level 4

Likes

30 likes

Total Posts

326 posts

Correct reply

54 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 25
Boost 10
View profile

Avatar
Validate 1
Level 4
MinusZero
Level 4

Likes

30 likes

Total Posts

326 posts

Correct reply

54 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 25
Boost 10
View profile
MinusZero
Level 4

21-12-2017

It would reset when someone else opens the form or refreshes because it will open the saved version for your website.

The only way you could do it is if you saved the pdf after printing, that way the updated number would be saved into the form...obviously being on a website that is a problem.