Copy link to clipboard
Copied
Hi All,
Working on a custom Adobe form layout in SAP where in the requirement is to display the names of the files attached in a text area in the Adobe form layout. File names in the text area should be hyperlinks which opens the file when clicked.
Can anyone help with the JavaScript to get the attached file names and display it in a text area in Adobe form layout ? Also, to make the file names as hyperlink.
Thanks,
Shailendra
Copy link to clipboard
Copied
Hi Experts,
Can anyone please assist with some valuable inputs ?
Thanks,
Shailendra
Copy link to clipboard
Copied
By "Adobe form" do you mean a PDF form?
It might be better to ask in the Acrobat forums if that's the case, the Coding Corner is pretty much a ghost town.
Copy link to clipboard
Copied
For questions about scripts in PDF files you should use this forum: JavaScript
Assuming you're talking about a PDF file, it's possible to display the names of all file attachments in a text file, but not to create links to them.
To create this list you can use this code as the text field's custom calculation script:
var fileNames = []
for (var i=0; i<this.dataObjects.length; i++) {
fileNames.push(this.dataObjects.name);
}
event.value = fileNames.join(", ");