cancel
Showing results for 
Search instead for 
Did you mean: 

How to refer the values in dropdown from WebService response?

0 Kudos

In my Adobe Interactive form,

I have Course Type ID and Course Name fields.

Course name is a dropdown that gets filled in the Form Ready event and the "Specify Item Values" is attached to

  

!connectionData.FetchCourseType.Body.ZFETCHCOURSETYPEResponse.ZCOURSETYPES.item[*]

Now in the TAB event of Course Type ID, I am fetching the Course name and adding to the above dropdown.

But it is adding duplciates.

So to delete the duplicates, I need to read the WebService response in the TAB even of Course ID.

I tried something like

particulars = xfa.datasets.resolveNode("this.parent.COURSENAME");

(var i = 1; i < particulars.nodes.length; i++)


{
p = particulars.nodes.item(i);

But here p.vlaue is blank
break;
}


Can you please provide suitable syntax to achieve this?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Try this code:

var particulars = this.parent.COURSENAME.resolveNode("#items");

this will bring the dropdown list into the variable particulars

then


for (var i = 1; i < particulars.nodes.length; i++)
{
p = particulars.nodes.item(i);

here p.value will have the dropdown line by line;
add your valdiations etc
}

0 Kudos

I had to umark this as correct.

The above code is helpful in reading the dropdown.

p.value is returning the Course Name but I still have an issue in that I have compare the Course ID in the first field against the course ID bound to the dropdown and then fill proper text.

So this is still not working from the above code.

Answers (0)