cancel
Showing results for 
Search instead for 
Did you mean: 

Get enumeration text for a data element?

Former Member
0 Kudos

I've created a simple data type which has an enumeration of 10 values associated with it. I'm currently presenting a read-only data field for the data type as a drop down by key field to get the descriptive text (via the enumeration) displayed on the page. However, the users have requested that a drop-down not be used; rather, they want to see just the descriptive text.

How can I do this? I've perused the api's, but I can't see how to get at the enumeration text for a given data type value.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

if you have attribute in the context of the simple type you have created then:


IWDAttributeInfo loAttrInfo = wdContext.<node>.getNodeInfo().getAttribute("<attr_name>");
ISimpleType loSimpleType = loAttrInfo.getModifiableSimpleType();
ISimpleValueSet loValues = loSimpleT.getSVServices().getValues();

You can get your texts from 'loValues' now.

Regards,

Anton

Former Member
0 Kudos

Worked perfectly, thanks!

Answers (0)