Highlighted

Prepopulate XML

Avatar

Guest

12-11-2008

Hello,



I would like to use data to prepopulate fields in a form viewed in Workspace. I would also like to use the same data for mapping purposes like sending email, task instructions, etc.



I am using the assign task to view an xfaForm in which I would like to insert data.



I am new to LiveCycle. Can anyone help..... please



Thank you

Replies

Highlighted

pguerett

13-11-2008

Is this the 1st step that starts the process or somewhere in the middle of the process. Are you using a n XDP template to render to the user or a pre-created PDF? Where will this data for pre-population come from? Is it in XML format or are you merely pushing a couple of field values into the data?
Highlighted

Avatar

Guest

13-11-2008

>>Is this the 1st step that starts the process or somewhere in the middle of the process.

This would be the middle of the process as I would like to extract data first.



>>Are you using a n XDP template to render to the user or a pre-created PDF?

I am trying to use the extracted data from an interactive PDF to insert in an XDP and to prepopulate in other tasks (using XPATH) e.g. task instructions, sending email, etc.



>>Where will this data for pre-population come from?

Interactive PDF



>>Is it in XML format or are you merely pushing a couple of field values into the data?

I would like to extract the data a XML format to prepopulate the XDP form.



Thank you for helping.
Highlighted

pguerett

13-11-2008

If you are using an XFAForm Variable to render your form, when the user submits the form back in the data in that form will be pushed into the xfaForm Var. Look under the xfa/datasets/data node. Using XPath expressions you can take all or part of the data out and write the to process variables. You can alos push data back into individual nodes in this variable. Then pass it into the next user step. By doing this Livecycle will merge the data onto the template and render in automatically for you.
Highlighted

Avatar

Guest

13-11-2008

Paul - Thank you for replying.



I can extract data and reuse it in an xfaForm variable when the form was submitted in Workspace.



I am having trouble with extracting data from an interactive PDF that has been taken offline and emailed back to the Workflow Server. I would like to then reuse the extracted data functionality like task intructions, sending notifications, inserting data in an email template, etc.



I am unable to extract data to an xfaForm variable suing the Export Data module.
Highlighted

pguerett

14-11-2008

Make sure that the variable that you define as output in that service is a dcoumnt. Then use a setValue to cast the document to an XML variable.
Highlighted

Avatar

Guest

16-11-2008

Thanks Paul



it worked !!



Apparently the format it extracts the data is a bit differently to my expectations. When I try to render the PDF and merge the extracted XML, I get a "type mismatch" error. I think there is some tag mismatch.



However, when I try to merge the same document with another XML I manually created as a sample, it works just fine and I am able to view the PDF with the merged data.



Is there a way to reference the XSD while extracting the data so it extracts as per the XSD ?
Highlighted

pguerett

16-11-2008

If you bind the form using the schema definition in the 1st place it will extract it in the format of the schema automatically.
Highlighted

Avatar

Guest

16-11-2008

I have bound and embedded the XSD in the form. However, there are a few additions which is causing this error. <br /><br />Manual XML file which works:<br /><br /><?xml version="1.0" encoding="UTF-8" ?> <br /><WorkflowSample><br /><personaldetails><br /><firstname>John</firstname> <br /><lastname>Smith</lastname> <br /><email>aditya.shah@gsinc.com</email> <br /></personaldetails><br /><Decision><br /><Approve /> <br /><Decline /> <br /></Decision><br /></WorkflowSample><br /><br />Workbench extracted XML through "export data" module which gives a "tag mismatch" error:<br /><br /><?xml version="1.0" encoding="UTF-8" ?> <br /><xfa:datasets xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/" xmlns:dd="http://ns.adobe.com/data-description/"><br /><xfa:data><br /><WorkflowSample><br /><personaldetails><br /><firstname>retert</firstname> <br /><lastname>rtretr</lastname> <br /><email>retert</email> <br /></personaldetails><br /><Decision><br /><Approve /> <br /><Decline /> <br /></Decision><br /></WorkflowSample><br /></xfa:data><br /><dd:dataDescription dd:name="WorkflowSample" xmlns:dd="http://ns.adobe.com/data-description/"><br /><WorkflowSample><br /><personaldetails><br /><firstname /> <br /><lastname /> <br /><email /> <br /></personaldetails><br /><Decision><br /><Approve /> <br /><Decline /> <br /></Decision><br /></WorkflowSample><br /></dd:dataDescription><br /></xfa:datasets><br /><br />I noticed the few differences. <br /><br />1) From "<dd:dataDescription dd ...." the second set of XML tags are added<br />2)"<xfa:data>" is also an addition, which I think seems to be the problem. <br /><br />Do you know any other way of extracting XML or controlling how the data is extracted ?<br /><br />Thanks.