Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Prepopulate XML

Not applicable
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
14 Replies
pguerett
Level 10
Level 10
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?
Not applicable
>>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.
pguerett
Level 10
Level 10
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.
Not applicable
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.
pguerett
Level 10
Level 10
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.
Not applicable
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 ?
pguerett
Level 10
Level 10
If you bind the form using the schema definition in the 1st place it will extract it in the format of the schema automatically.
Not applicable
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.
Jasmin_Charbonn
Level 10
Level 10
Try to export the data with the processFormSubission from the Form service instead.



Jasmin
Not applicable
Jasmin - I don't get any XML output from a prefilled PDF. When I Record and Review, I do not see anything assigned to the Output XML variable. This way nothing is passed to the next process and the resultant form doesn't have any data to merge and therefore appears blank.



I have specified the CONTENT_TYPE=application/pdf



Thank you for helping.
Jasmin_Charbonn
Level 10
Level 10
Make sure to set the 'Populate XML Data' to true and 'Export Data Format' to XML Only.



Jasmin
Not applicable
I did a record and review of the workflow and I still don't get any XML output after implementing your suggestions.



However, changing "Export data format" to XDP helped. I reverted back to the original settings for "Populate XML Data".



I am now able to extract XML and reuse the data in and outside the form.



Gary and Jasmin - Thank you for helping
Not applicable
> Hi,<br /> <br /> I am new to adobe interactive forms and i have to pre-populate the adobe form dynmicaly before display it on browser with the data availabe in my client machine where am using java api to read the from template from Adobe form server.<br /><br /> I have created XML and passing it as data to the processFormSubmission method, but the form not getting populated with data.If i see the output data it has the repeated tags in <xfa:data> </xfa:data><br /><br />Sample XML: <?xml version = '1.0' encoding = 'UTF-8'?><br /> <ListOfPubSampleUploadContact>");<br /> <Contact><br /> <FirstName>Sreenivasulu</FirstName><br /> </Contact><br /> </ListOfPubSampleUploadContact><br /><br />Java Code: com.adobe.idp.Document formData = new com.adobe.idp.Document(defaultData); <br /> <br /> // set the Rendering Options<br /> RenderOptionsSpec processSpec = new RenderOptionsSpec();<br /> processSpec.setLocale("en_US");<br /> processSpec.setXMLData(true);<br /> processSpec.setExportDataFormat("XDP");<br /> <br /> <br /> FormsResult formOut = formsClient.processFormSubmission(<br /> formData, // form data<br /> "CONTENT_TYPE=application/xml", // environment buffer<br /> "", // user agent details<br /> processSpec // options<br /> );<br /><br />Regards,<br />Sreeni.
pguerett
Level 10
Level 10
Can you try merging the data onto the form in Designer preview mode first to see if the dta is bound correctly or not.