Skip navigation
HelloAA1234
Currently Being Moderated

How to retrieve the multiple rows data on PDF form in a web service method using WSDL DataConnection

Jul 7, 2010 4:12 AM

How to retrieve the multiple rows data on PDF form in a web service method using WSDL DataConnection.

 

I have a multiple rows on PDF form. All rows have 4 textfields. I want to submit the multiple rows data to a method defiened in webservice.

Unable to retrieve the data in multiple rows within webservice method.

 
Replies
  • Currently Being Moderated
    Jul 7, 2010 5:37 AM   in reply to HelloAA1234

    You woudl have to define an input parameter for each field ....but there is a variable number of rows so this will not work. I woudl define a single string input parameter and pass the entire XML data that is in the form. You can create a hidden field to hold the data and bind the paraneter to that field. To get the data into the field use this command:

     

    FieldName.rawValue = xfa.dataset.data.saveXML("pretty")

     

    Then when you get the data into the web service you can parse or load the xml into a DOM and get what you want.

     

    Hope that helps

    Paul

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 30, 2010 1:09 PM   in reply to HelloAA1234

    Hello,

     

    I have seen Paul used the DOM technique but curious on your solution too.

    Can you please share solution with using table to display multiple rows data on a PDF form.

     

    Thanks,

    Han Dao

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 22, 2011 6:15 AM   in reply to pguerett

    Hi Paul,

    I don not know if you can help me!

    I have a hidden text field that holds an XML returned from database with multiple rows; I want to bind the retrieved data with a table inside the pdf, I read your post but I did not know how to use DOM, can you give me an example.

     

    Thanks

    Hussam

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 22, 2011 6:21 AM   in reply to hussam ihmaidi

    You woudl need to load the data into the Dom and assuming the bindings are correct the data will fill the fields. To load the data int the dom you woudl use the command xfa.dataset.data.loadXML(fieldname that holds the data.rawValue). The key is to do find an event that will fire after the web service has completed.

     

    Paul

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 22, 2011 6:32 AM   in reply to pguerett

    Hi Paul,

     

    thank you for your prompt reply. can you please tell me how to bind the DOM to my table?

     

    Thanks

    Hussam

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 22, 2011 8:08 AM   in reply to hussam ihmaidi

    The easiest way is to write the data file created to a file on the file system then use that as a data connection in designer and simply drag and drop the nodes in the xml onto the fields in the data stream. Note that you would only do the 1st row of the table.....then you would bind the repeating row subform to the repeating node in the xml.

     

    Paul

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 22, 2011 11:14 PM   in reply to pguerett

    Hi Paul,

    I'm now able to save the retrieved xml in a hidden text field and create dynamic table, and I'm able to fill this table from the XML, but the problem is that I could not find the correct way to loop on the xml, what I'm trying to say, the table will have number of rows with the data of the first row only, so can you tell me the right way to loop on the xml!

     

    this is my code

     

    TextField1.rawValue=xmlData.document.rawValue;
    xfa.datasets.data.loadXML(TextField1.rawValue, true, false);

    for(var i=0; i<count; i++)
    {

    xfa.form.resolveNode("form1.P1.Table1.Row1["+i+"].Num").rawValue = xfa.datasets.data.record.num.value;
    xfa.form.resolveNode("form1.P1.Table1.Row1["+i+"].Name").rawValue = xfa.datasets.data.record.name.value;
    Table1.Row1.instanceManager.addInstance(true);
    }

     

    Thanks

    Hussam

     

     

     

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 23, 2011 5:30 AM   in reply to hussam ihmaidi

    You shoudl not be putting the values into the table yourself ...this is handled by the binding. If you send me the form and the xml (you can put it into the recieving field and I can load it here) I will set the binding so you can see what needs to be done. You can send it to LiveCycle8@gmail.com .....please include a description of the issue in the email.

     

    Paul

     
    |
    Mark as:
  • Currently Being Moderated
    Sep 16, 2013 7:11 AM   in reply to HelloAA1234

    Hi,

     

    Can you please tell me how you have achived this?

     

    Regards,

    Tushar.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points