Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

Adobe LiveCycle preview PDF

Avatar

Level 2

Form fields update correctly when viewing in livecycle but not when opened in adobe x pro.  Specifically two field I have.  One for the current date and one for the current time.  When I view them in the PDF viewer in Livecycle everything works fine.  But when I open the document in Adobe X Pro or Adobe Reader XI, both fields display the date and time from when it was saved last in Livecycle...how do I make it work the way it does in the PDF viewer??

7 Replies

Avatar

Level 2

This is what I'm using with formCalc:

if(F.P1.DateTimeField1.isNull)then

F.P1.DateTimeField1.rawValue=num2Date(Date(), "MMMM DD, YYYY")

endif

Seems really simple and works without issue in the PDF viewer...


Avatar

Level 10

This behavior is correct, because once saved, the fields aren't empty anymore so the script doesn't fire again.

To solve this problem see this thead: Re: Reader extension

Avatar

Level 2

I did exactly as you said...and nothing seems to be happening.

This is my LC field:

934942_pastedImage_0.png

And here is the Java Debugger field.  Debugger is acting strange though.  I cannot make the window any larger than it is and when I attempt to initialize it nothing happens.  And the same script will show up in debugger windows on other documents...

934952_pastedImage_1.png

Avatar

Level 10

The return value in the console is null, so the field has been cleared (it also should be cleared in the form as well). Now Reader-enable your form. Next time you open in you should get the current date.

Avatar

Level 2

It still only reflects the date that it was saved in Livecycle.  It's not clearing that field.  And I have no idea why...  Also, if I can get this working with the JS Debugger, will this work for anyone who opens the form?  Or would this Debugger script need to be placed on every PC?

Avatar

Level 2

Can't I force this field to zero out with FormCalc formulas when the document is opened?  Something like this:

$.rawValue=null then

if($.isNull) then

$.rawValue=num2date(date (), "MMMM DD, YYYY")

endif

endif

Avatar

Level 10

This wouldn't make sense, because then the field will be reset everytime you reopen the form.

Then you can also use the script:

$.rawValue=num2date(date (), "MMMM DD, YYYY")