Skip to main content
tristap41495044
Participant
Apr 4, 2018 9:48 PM UTC
Answered

Dynamic Stamp - text field

I am in the process of creating a dynamic stamp with a text field that has a custom calculation script to use the document name.

This is the script that I found and am using:

event.value = event.source.source.documentFileName;

It pulls the document name in fine but it displays it as 1234.pdf, is there a different script or more that I need to add to the current script that would pull in the document name but leave off the .pdf?

This topic is closed to new replies. Start a new post to keep the conversation going.
try67
try67Correct answer
Community Expert
Apr 4, 2018 10:13 PM UTC

It's a simple string manipulation:

event.value = event.source.source.documentFileName.replace(".pdf", "");

3 replies

Participant
May 20, 2021 12:36 PM UTC

u

Translate
try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
Apr 4, 2018 10:13 PM UTC

It's a simple string manipulation:

event.value = event.source.source.documentFileName.replace(".pdf", "");

Translate
tristap41495044
Participant
Apr 4, 2018 10:16 PM UTC

That worked beautifully!! Thank you for your quick response.

Translate