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

Seperating Save As Result

New Here ,
Apr 19, 2024 Apr 19, 2024

I've created i Work Order Form for my work, everything is finally working perfect after many weeks of hard work, there only 1 thing that bothers me is that in a script i created it, it takes some value from some feild and its saves it as a pds, as a example, it takes work order #/Name/Today's Date, and it creates a pdf file like this example: 0025874BobMacApril192024.pdf, id love to seperate the value like this( 0025874-BobMac-April192024.pdf Or 0025874/BobMac/April192024.pdf, here is the code i have as of right now, please if you have any fix for me please let me know

var myFileName = this.GetField(Work Order #").value + this.getField("Name").value + this.getField("Today").value+".pdf")

 

myFileName = "/c/PDF/" + myFileName);

thanks You

TOPICS
PDF
163
Translate
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 ,
Apr 19, 2024 Apr 19, 2024
LATEST

You just add the hyphens as strings, just like you did with the file-extension at the end:

 

var myFileName = this.fetField(Work Order #").value + "-" + this.getField("Name").value + "-" + this.getField("Today").value+".pdf";

 

PS. I assume you wrote the code again instead of copying and pasting it, as it contains errors that means it will not work if used as-is... I fixed those errors in the above line.

Translate
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