Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

How to remove a value from dropdown

Hi,

I have a dropdown attached to a node-attribute.

this attribute is binded with a dictionary-simple type and its having 3 values.

Now i want to remove only one value from this dropdown through coding.

how to do that ?

please help me

thks

John

Former Member
Former Member replied

Hi John

Use the below code , through this you can modify the content of your simple type.

IWDAttributeInfo attr=wdContext.getNodeInfo().getAttribute(" Your Attribute name ");

// or IWDAttributeInfo attr=wdContext.getNodeInfo().getAttribute(" IPublicViewName.IContextElement.AttributeName");

ISimpleTypeModifiable stm=attr.getModifiableSimpleType();

IModifiableSimpleValueSet svs=stm.getSVServices().getModifiableSimpleValueSet();

svs.Removekey ( " Use the key you want to remove "); // check from your simpletype in dictionary.

Hope it helps.

Thanks

Puneet

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question