• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Sequential numbers, Saved file name, Touch signature

Community Beginner ,
Aug 20, 2018 Aug 20, 2018

Copy link to clipboard

Copied

Hi again community,

          I have a problem with some subjects that have been brought up multiple times on these forums, but I’m the type of person who seems to be the first to encounter problems that are normally fixed easily if it were to happen to anyone else.  I’ve searched online, on the Adobe forums, but either the formulas don’t work for our template or the solutions where on older Acrobats with different menu layouts and where missing one little setting…

          I’m finalizing a PDF template for use as Work Orders.  All I’m trying to do is the following;

Sequential Numbering – I’ve attempted the JavaScript a couple of times but can’t get it to work.  I was able to make the auto date function (thanks to this forum) but not the sequential numbering.  We would like to have the initials of the employee followed by a number that would go up by 1 every time the work order is completed by a submit button (signature confirmation).  The work order numbers would be like this; BL-50000, BL-50001, BL-50002 and so on.

What I have attempted so far,

In text field properties:

                        1- 

  • Name – workOrderNumber
  • Format – None
  • Actions – Mouse up, Mouse enter, Mouse Exit
  • Actions – Run JavaScript with code:

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

if (f.value=="") f.value = "BL-50000";

else f.value = util.printf("%04d", (Number(f.value)+1));

                      

                         2-

  • Name – workOrderNumber
  • Format – None
  • Actions – Mouse up, Mouse enter, Mouse Exit
    • Forgot which one but the only one that changed the number would change it every time I clicked the WO # field and than in a text box.
  • Actions – Run JavaScript with code:

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

if (f.value=="") f.value = "50000";

else f.value = util.printf("%04d", (Number(f.value)+1));

3-

  • Name – workOrderNumber
  • Format – Custom, Format Script with code:

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

if (f.value=="") f.value = "BL-50000";

else f.value = util.printf("%04d", (Number(f.value)+1));

  • Actions – Mouse up, Mouse enter, Mouse Exit
  • Actions – None

Saved file name – We would like the work order number to be automatically saved as a file name.  Like mentioned above, the file name would be BL-50000, BL-50001, BL-50002 once signature is confirmed.

Signature - The famous one…  All we want is a signature block that the employee would click once he is done filling out the work order and have a touch pane pop up for the customer to sign his name on it either with a touch pen or a finger.  Once the signature is confirmed, the PDF is saved (file name as work order number) in a specific folder and non-editable afterwards.  The file can than either be printed or emailed.  But the signature block only gives me my own digital signature and no other options.  For our needs, our signature is useless!  I read that a solution would be using the trace tool but the employees that would use these digital work orders are stuck in the 90’s and have no tech knowledge to click a multiple icons and menus in the template.

     I’m trying to make filling out the template as simple as possible, clicked the blue squares to type info, click signature block, confirm and done! Hopefully this is possible.  I’m still new into JavaScript myself but I do try to learn from others!  If this is too complicated, is there a not too expensive software that can do this?

I’m using Acrobat Pro DC (2018) on Windows 10 Pro!

Thanks for any help, advice, inputs, etc.!

TOPICS
Acrobat SDK and JavaScript , Windows

Views

239

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 20, 2018 Aug 20, 2018

Copy link to clipboard

Copied

Only the code in #2 should work, as the other default values you've used can't be converted to a number.

I can't really follow what you're asking, though. Try to keep it short and to the point, please.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Aug 22, 2018 Aug 22, 2018

Copy link to clipboard

Copied

LATEST

Thanks for trying.  The worst part is I did try to keep it condensed... here is a short short version for everyone;

     How can we have BL-50001, BL-50002 and so on show up automatically when the document is opened as the document number?  If the document is canceled however, the number won't be skipped the next time it's opened though!

     How can the document name be saved using the number (like BL-50001, BL-50002 and so) automatically without having to write the number manually in the save box since the employees using this aren't very techy!

     What are the solutions for touch signatures?  All we need is a box that the employee can click when finishing the document so the customer can just sign on the screen with a finger or touch pen.  Than the employee confirms the signature and goes straight to the save dialogue box.  Once saved, the work order document would not be editable!

I’m using Acrobat Pro DC (2018) on Windows 10 Pro!

Thanks!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines