Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
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.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now