Avatar

Level 4

Hi

Yes its working for the dropdowns for which values are specified manually but here in this case the values are populating from the XML file.

I will just explain my case.

Here is my xml file which i have included as a data file in the preview tab, because my form is already binded with an XSD.

<?xml version="1.0" encoding="UTF-8"?>
<VCF xmlns="http://tempuri.org/VCF.xsd">

<States>
<item uiname="Andhra Pradesh" token="IN1"/>
<item uiname="Maharastra" token="IN2"/>
<item uiname="Tamilnadu" token="IN3"/>
</States>

<IN1>
<item uiname="Hyderabad" token="IN11"/>
<item uiname="Visakhapatnam" token="IN12"/>
</IN1>
<IN2>
<item uiname="Mumbai" token="IN21"/>
<item uiname="Pune" token="IN22"/>
</IN2>
<IN3>
<item uiname="Chennai" token="IN31"/>
<item uiname="Vellore" token="IN32"/>
</IN3>

</VCF>

In the Designer i have a state dropdown filed, by clicking Field->list items

Items:$record.States.item[*]

Item Text:uiname

Item Value:token

Also i have deselected the specify item values.

And in the Change event of the state dropdown, I have written below code to populate the city dropdown field

function stateChange(state,city)
{
var tempString = "xfa.record." + state.boundItem(xfa.event.newText);

var oItems = xfa.resolveNode(tempString);
var nItemsLength = oItems.nodes.length;
city.mandatory="";
city.clearItems();
city.rawValue = null;

for (var nItemCount = 0; nItemCount < nItemsLength; nItemCount++)


city.addItem(oItems.nodes.item(nItemCount).uiname.value,oItems.nodes.item(nItemCount).token.value);
}
city.validate.nullTest = "error";
}

Now in the generated XML, I am getting the token values instead of the display values.

Pls help.

Thanks

Abhiram