cancel
Showing results for 
Search instead for 
Did you mean: 

Drop down by key

Former Member
0 Kudos

Hi experts,

I have a drop down(DROP DOWN BY KEY) which has 2 enumaration value yes & No. My NOde name is DD_YES_NO.Attribute name is the same as NODE.I am not eble to set the value of the selected dropdown into the context attribute.

Please help me with possible code how to create a drop down and set the value of the drop down into the context attribute.

Its urgent.Please reply as early as possible.

Regards,

Aniruddha

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member214651
Active Contributor
0 Kudos

Hi Aniruddha,

When u use DD by Key, u have to use a context attribute and not context Node. Try the following:

1. create a DD by UI element in the screemn.

2. create a context attribute of type String in the context tab

3. In the Dictionary part of the WD project, create a simple type "YesNo" of type String

4. In the Enumeration tab, enter values for key and values as "Y / Yes" "N / No"

5. Bind the context attribute to the simple type created.

then the values will be visible in the DD by key

Regards,

Poojith MV

p330068
Active Contributor
0 Kudos

Hi Aniruddha

Create Context node selection properties as 1:1

Write code for populating value in context node like

IDD_YES_NOElement ele = wdContext.createDD_YES_NOElement();

If(<Your Criteria>)

{

ele.setDD_YES_NO("Yes");

}else{

ele.setDD_YES_NO("No");

}

wdContext.nodeDD_NODE().addElement(ele);

And then bind to drop down.

Hope it helps,

Regards,

Arun

yogesh_galphade
Contributor
0 Kudos

hi

try to change node attribute cardinality to 1.1, so that first value will be always shown by default.