Expand my Community achievements bar.

Enhance your AEM Assets & Boost Your Development: [AEM Gems | June 19, 2024] Improving the Developer Experience with New APIs and Events

Check in script if data merge has occured or not

Avatar

Former Community Member
Hi all,



I am using Designer 8.1 and i am looking for a way to figure out in script if a particular field's data merge has completed or not. Is it possible?
7 Replies

Avatar

Former Community Member
If you code against the DocReady or FormReady event you can be sure that data murge is complete.

Avatar

Former Community Member
I forgot to mention that i am using form guides, do DocReady and FormReady fire for form guides?

Avatar

Former Community Member
Are we sure it does after the data merge?? To test it, I placed a xfa.host.messageBox statement on Form Ready and the message popped up before the data was merged. Any clues??

Thanks for any help

Avatar

Former Community Member
The message box will appear and suspend the display of the PDF ..... but it is still working in the background.

Avatar

Former Community Member
Thanks for the reply Paul. If I try to print the form (xfa.host.print) on DocReady event, the form comes up blank. That is data merged is not showing up on form. If I do the print on DocClose, the data is showing up on the form. Any Ideas???

Thanks.

Avatar

Former Community Member
I believe the data is there ....on the Doc Ready do an app.alert(fieldname.rawValue) if it comes up with the value from your data then you know it is there. If it comes up null or blank then you know it is not.



The print is not a valid test (IMHO).