Skip to main content
Participating Frequently
Oct 22, 2020 11:42 AM UTC
Question

Future Date

I want to calculate the future date from todays date plus x number of days. Never having used Java Script before what steps do I follow to incorporate the calculation into the PDF Document. When I attach the PDF Document to an email I don't want the field to be updated for the recipient but remain effectively at the original date. It represents the expiry date on a Membership Card and we don't want it to change each time the recipients opens the attachment.

This topic is closed to new replies. Start a new post to keep the conversation going.

12 replies

try67
Community Expert
Community Expert
Oct 22, 2020 2:18 PM UTC

So when do you want it to update, exactly? If only once then you can just fill it in manually. If you want to do it using a script you can run it from the JS Console, for example.

Translate
Participating Frequently
Oct 22, 2020 2:42 PM UTC

When a new member joins our organisation they are sent an email with the temporary memberhip card attached. The cardhas to be good for a number of days (to be determined) before they receive their annual membership card. I can do it manually but that means each day I have to update the expiry date (todays date plus x number of days). Can Java Script each day do this calculation automatically and ensure it can't be changed when new member opens the attachment

Translate
try67
Community Expert
Community Expert
Oct 22, 2020 2:48 PM UTC

No, it can't do it by itself. Something has to trigger it, such as opening the file, or pressing a button, or something like that.

Translate