Expand my Community achievements bar.

Why doesn't it work?

Avatar

Level 2

Any help in the matter be much appreciated. Before i start explaining i've added a picture, some info. As obvious by the pic i have made the form with interactive PDF for Dynamic Properties. See below the pic for more explantion.

pdf example.jpg

So, i try to populate my form with info from XML.

For example i want the XML to fill my list with all the products written in the XML as you can see below. Yet so far i've only reached as far as it give me in a preview to see a blank line, nothing else.

I've been stuck on this for several days so any help be much appreciated.

This XML's -

Maslulim -

- <list_maslulim>

- <maslul>

<sug_muzar>2</sug_muzar>

<maslul_num>131</maslul_num>

<maslul_name>איילון-פיסגה קרן פנסיה</maslul_name>

</maslul>

- <maslul>

<sug_muzar>2</sug_muzar>

<maslul_num>162</maslul_num>

<maslul_name>מקפת אישית</maslul_name>

</maslul>

- <maslul>

<sug_muzar>2</sug_muzar>

<maslul_num>163</maslul_num>

<maslul_name>דש - קרן פנסיה מקיפה</maslul_name>

</maslul>

</list_maslulim>

and Maslul -

- <data_maslul>

<sug_muzar>2</sug_muzar>

<maslul_num>163</maslul_num>

<maslul_name>דש - קרן פנסיה מקיפה</maslul_name>

<guf_minael>דש - קרנות פנסיה בע"מ</guf_minael>

<dmey_nihul_hisahon>0.45</dmey_nihul_hisahon>

<dmey_nihul_afkadot>4.87</dmey_nihul_afkadot>

<tsua_bruto>2.00</tsua_bruto>

<meidat_sikun>1.24</meidat_sikun>

<shiur>0.00</shiur>

</data_maslul>

This the XML's i'm trying to use. One to choose a product, the second to add a number later in another spot to fill corrosponding to that product which i've used(if i choose option A, the number it give me is 1, option b, 39, option c...etc...etc.).

Many thanks,

Tal

5 Replies

Avatar

Level 10

Hi,

If I understand correctly, you want to display a value from the data_maslul xml when a value is selected from the list_maslulim values?

You can do this in the change event of the dropdown list with JavaScript like;

TextField1.rawValue = xfa.resolveNode("$record.data_maslul.(maslul_num.value == '"+this.boundItem(xfa.event.newText)+"')").meidat_sikun.value;

Here is an example https://acrobat.com/#d=PCsdHmIRNYi-Wklznr8BOQ ,דש - קרן פנסיה מקיפה select from the drop down.

The XML I used looks like

 

<form>

  <list_maslulim>

    <maslul>

      <sug_muzar>2</sug_muzar>

      <maslul_num>131</maslul_num>

      <maslul_name>איילון-פיסגה קרן פנסיה</maslul_name>

    </maslul>

    <maslul>

      <sug_muzar>2</sug_muzar>

      <maslul_num>162</maslul_num>

      <maslul_name>מקפת אישית</maslul_name>

    </maslul>

    <maslul>

      <sug_muzar>2</sug_muzar>

      <maslul_num>163</maslul_num>

      <maslul_name>דש - קרן פנסיה מקיפה</maslul_name>

    </maslul>

  </list_maslulim>

  <data_maslul>

    <sug_muzar>2</sug_muzar>

    <maslul_num>163</maslul_num>

    <maslul_name>?? - ??? ????? ?????</maslul_name>

    <guf_minael>?? - ????? ????? ??"?</guf_minael>

    <dmey_nihul_hisahon>0.45</dmey_nihul_hisahon>

    <dmey_nihul_afkadot>4.87</dmey_nihul_afkadot>

    <tsua_bruto>2.00</tsua_bruto>

    <meidat_sikun>1.24</meidat_sikun>

    <shiur>0.00</shiur>

  </data_maslul>

</form>

Hope that helps

Bruce

Avatar

Level 2

Well, that might work!

Question though, you combined the XML's for it to work? I mean only one XML will work with that?

Avatar

Level 10

You will have to get the xml in there somehow, will probably depend how often if changes, if not very often then you can hardcode it in the form, otherwise maybe a webservice?

Avatar

Level 2

Well, let me rephrase my request. Those XML i wrote are infact linked in a URL(meaning that exist as web service). Is there anyway that i can link them to the Form somehow?

In the URL it end with XML and not WSDL and all that...

Anyway to request the Link in Java orso?

Avatar

Level 10

There is a GET function in FormCalc that you can use.  There is an example here http://blogs.adobe.com/formfeed/2009/08/version_control_for_forms_and.html, also shows how to call the FormCalc function from JavaScript. Once you have the XML you can do a loadXML to get the XML into your form