Expand my Community achievements bar.

Dropdown list problem while using an XML

Avatar

Former Community Member

Hi

I have a small xml file which is

<?xml version="1.0" encoding="UTF-8"?>

<VCF xmlns="http://tempuri.org/VCF.xsd">

<countries>

<item uiname="India" token="IN"/>

<item uiname="Australia" token="AU"/>

</countries>

</VCF>

I have given this xml file as a data file in the form properties-> preview tab

now i have a dropdown in my form

after clicking List items (please find the attachment)

list items.JPG

If i generate am xml using "submit by email" option the token appears in the value of the tag instead of that i want the text of the dropdown.

Pls help

Note: I have deselected "specify item values" . Also i cannot change the token value in the "item value" as i have some dependencies on it later.

Thanks

Abhiram

1 Reply

Avatar

Level 10

Hi Abhiram,

The problem is that the Submit by email  (or export XML), will only pass the value of the dropdown object.

In your case the value is set to the "token" or bound value of the dropdown. This is why the Submit/Export only shows the token and not the uiname.

Can you change the dependancies? Instead of script in other objects looking at the dropdown's .rawValue, you could use .getDisplayItem() (see here http://assure.ly/fYCuQ2).

Alternatively in the Dynamic properties you could set Item value to uiname as well.

This would mean that later script would need to reference "India" instead of "IN"; "Australis" instead of "AU", etc.

Maybe someone else would have a better workaround.

Good luck,

Niall