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

In the dynamic stamp, output the directory of the document to be stamped

Community Beginner ,
Oct 06, 2024 Oct 06, 2024

To display the file name I use:
event.value = event.source.source.documentFileName;
I couldn't find anything to display the directory.
Is there a way?

TOPICS
JavaScript , PDF
440
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
1 ACCEPTED SOLUTION
Community Beginner ,
Oct 07, 2024 Oct 07, 2024

Just the name of the folder in which the document is located would be perfect.
Thanks for the super-fast reply

View solution in original post

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 ,
Oct 06, 2024 Oct 06, 2024

event.value=event.source.source.path;

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 ,
Oct 06, 2024 Oct 06, 2024

The full directory path, or just the name of the folder where it's located?

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 Beginner ,
Oct 07, 2024 Oct 07, 2024

Just the name of the folder in which the document is located would be perfect.
Thanks for the super-fast reply

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 ,
Oct 07, 2024 Oct 07, 2024

Use this:

 

var pathParts = event.source.source.path.split("/");
event.value = pathParts[pathParts.length-2];

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 Beginner ,
Oct 07, 2024 Oct 07, 2024
LATEST

Thank you very much
It helped me a lot

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