Expand my Community achievements bar.

Issues with getting current date?

Avatar

Level 1

Hi, I'm a bit of a newbie when it comes to using livecycle.

I'm wanting a field to produce the current date when a button is pressed.

I originally tried using a button with a FormCalc script, just using Table1.Cell1=Num2Date(Date(), "DD/MM/YYYY")

This worked fine, however if I enable additional features for reader, the button still produces the date as normal within reader, but when it is saved and reopened I find that the date field is once again blank.

Does anybody have any idea how to get this working?

4 Replies

Avatar

Level 10

Hi,

If you go to File > Form Properties > Defaults, check that the Preserve Script Changes is set to Automatic:

Preserve script changes.png

That should work,

Niall

Avatar

Level 1

Hi Niall,

Thanks for the reply, I've checked the option as you suggested, but found it was already set to Automatic.

I'm going to try recreating the problem in a blank form to see if something in my current form could be interfering somehow.

Avatar

Level 10

Hi,

Have a look to see if there is a conflicting script. Possibly in the dat/time object (and not the button).

Also, is the form Reader Enabled? If not, then the data will not be saved in Reader.

Niall

Avatar

Level 1

Hi NIall,

I couldn't recreate the problem with a new form, I did however notice that somehow, probably through my own absent mindedness, everything had been moved into the master page content area. I moved it out and it seems that has fixed the problem.

Thanks very much for your help.