Skip navigation
Gonnviearwalla
Currently Being Moderated

Help!

May 8, 2012 12:23 AM

Hello, i'd like to know if anyone can help me.

 

I'm attempting to create a PDF Form, with simple enough conditions.

 

I'm making Drop-Down List box that connect to XML(www.blaHBLAH.COM/blahblah.xml). That is, that the drop-down list be populated from the XML.

 

Additionally i want to create several more boxes(text, perhaps?) that if, for example, i choice in the Drop-Down list box a choice called A. this texts go to the xml and find its corrosponding numbers, that is lets for example that choice A makes another box represent the Number 1.

 

Question is ...how do i do that?

Please help me if i can.

 
Replies
  • Currently Being Moderated
    May 8, 2012 8:19 AM   in reply to Gonnviearwalla

    You can do this but you may not be able to load the XML from a web URL. If the XML is an output of a WSDL call, then you may be able to.

    You can traverse thru the XML nodes using xfa.resolveNode method.

     

    The below code gives you the value of a node two levels deep from the root node. You can use this idea to traverse thru your XML nodes to get the specific value.

         xfa.resolveNode("$record.<tagname>.<tagname>").value;

     

    Thanks

    Srini

     
    |
    Mark as:
  • Currently Being Moderated
    May 8, 2012 9:33 AM   in reply to Gonnviearwalla

    Can you send me the Form and XML to LiveCycle9@gmail.com so I can help you..

     

    Thanks

    Srini

     
    |
    Mark as:
  • Currently Being Moderated
    May 9, 2012 7:45 AM   in reply to Gonnviearwalla

    The form that you are using does not support Dynamic content on the form. This is because the form was a document to PDF form. In that scenario, LiveCycle treats the form as an Image and allows to be saved only Static PDF form.

     

    The population of the dropdown from the XML with the properties needs dynamic binding which can not be done with your form.

     

    You have two options.

        1) Re develop the form in LiveCycle Designer so it can be saved as Dynamic PDF and will enable the dynamic bidnings for you.

        2) Write code manually to load the dropdowns from XML data.

     

    Place the following code in the initialize event of the dropdown to get it populated.

     

    var oSubform = xfa.resolveNodes("$record.maslul[*]");

    for(i=0;i<oSubform.length;i++){
    var oNode = xfa.resolveNode("$record.maslul[" + i + "]");

    maslul_name.addItem(oNode.maslul_name.value,oNode.maslul_num.value);
    }

     

    Thanks

    Srini

     
    |
    Mark as:
  • Currently Being Moderated
    May 9, 2012 8:54 AM   in reply to Srini Dhulipalla

    In the form, you had created a data connection to the form with the XML.

    Then you had also added the XML data file to the Preview property. That means when you Preview your form in the Designer, the data from XML will be loaded to the form based on the bindings done to the fields.

     

    In your case, you wanted the dropdown to be filled with values from the XML. So I asked you to place the code in the initialize event of the dropdown, so it will read the XML data and add values to the dropdown.

    untitled.JPG

    Hope this helps.

     

     

    Thanks

    Srini

     
    |
    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