cancel
Showing results for 
Search instead for 
Did you mean: 

Get Enumeration Texts

HuseyinBilgen
Active Contributor
0 Kudos

Hi,

Suppose that I've a simple type for Countries with name "contries".

<ckey> <ctext>

e.g. DE Germany

I've a context element "contry" of type "countries". I've bound this context element to a DropDownByKey in a form.

When I post this form, it returns the ckey of selected element to "country" context element. This is OK.

But when I want to email this form, I want to display ctext instead of ckey as value.

How can I access the ctext value of ckey?

regards

Accepted Solutions (1)

Accepted Solutions (1)

arun_srinivasan
Contributor
0 Kudos

hi

try this

String ctext=wdContext.node<nodename>().current<node name>nodeElement().get<valatr>();

hope this helps,

Regards,

Arun

HuseyinBilgen
Active Contributor
0 Kudos

it returns only DE. I want Germany

Former Member
0 Kudos

Get the attribute info, get the value set and get the text for this key from the value set.

Armin

HuseyinBilgen
Active Contributor
0 Kudos

Thanx Armin,

but how? Could you please give me a code sample

Former Member
0 Kudos

1. Get the attribute info (IWDAttributeInfo) for the attribute to which you have bound the "selectedKey" property of the drop-down list.

2. Get the (simple) type (ISimpleType) from the attribute info

3. From the simple type, get the "simple value service" and from this, get the values

And now try this using the API

Armin

Answers (0)