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

Javascript to print attached file names in a text field in Adobe form layout

New Here ,
May 24, 2017 May 24, 2017

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

Views

1.7K

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
New Here ,
May 25, 2017 May 25, 2017

Copy link to clipboard

Copied

Hi Experts,

Can anyone please assist with some valuable inputs ?

Thanks,

Shailendra

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 Expert ,
May 25, 2017 May 25, 2017

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.

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 Expert ,
Jul 03, 2017 Jul 03, 2017

Copy link to clipboard

Copied

LATEST

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(", ");

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