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

Create a Stamp that adds today's date each time

New Here ,
Nov 01, 2017 Nov 01, 2017

I don't understand why this is difficult.

I've created the stamp I need. I just want it to add the date each time I use it

I added javascript but that just adds the date the stamp was originally created, not the time it was used.

Even the ability to type it in manually and hen have it save/printable would be helpful.

TOPICS
General troubleshooting
4.4K
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 ,
Nov 01, 2017 Nov 01, 2017

What is the script you are using in your stamp?

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
New Here ,
Nov 01, 2017 Nov 01, 2017

In the "calculate" > "custom calculation script box" I have :-

var myfield=getField("datebox");

var date=new Date();

date=util.printd("mmm dd yyyy", date);

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 ,
Nov 01, 2017 Nov 01, 2017

That should work. What is your stamps name? You can find this by opening the stamp file, and then going to the "Page Templates" functionality. You will see something like this:

aaaa=bbbb

The first part of this string is the internal stamp name, the second part after the equal sign is the name that gets presented to the user.

To force the stamp script to be executed every time you place stamp, this string has to start with a '#':

#aaaa=bbbb

If that '#' is not part of the internal stamp name, then the script will only be executed once.

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 ,
Nov 01, 2017 Nov 01, 2017

Actually, your code is incorrect. Nowhere in it are you applying the new value to the field.

Add this line as the last line of your code:

event.value = date;

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 ,
Nov 01, 2017 Nov 01, 2017

Good catch. That's actually how I read the last line

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
New Here ,
Nov 01, 2017 Nov 01, 2017
LATEST

This is using Adobe DC. I don't seem to have a document processing option, so I can't get to the Page Template.

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