Skip to main content
Participating Frequently
October 22, 2020
Question

Future Date

  • October 22, 2020
  • 1 reply
  • 1205 views

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 has been closed for replies.

1 reply

try67
Community Expert
Community Expert
October 22, 2020

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.

Participating Frequently
October 22, 2020

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

try67
Community Expert
Community Expert
October 22, 2020

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.