cancel
Showing results for 
Search instead for 
Did you mean: 

Dropdown by index - fetching value of name

Former Member
0 Kudos

Hi All,

I have a dropdown by index displaying concatenation of id and name of employee(s). I fetch only the id by using 'substring' for sql queries. I don't want the id's to be displayed in the dropdown. How can I display only the names and hide the ids? But, on select, I should get the value (id) of the name. Can any one suggest a solution?

Regards,

Srinivasan

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

srinivasan,

As far as you have DropDownByIndex, you already have some context node.

Create 2 attributes in this node: ID (whatever type) and DisplayName (string).

Populate node in a way, that DisplayName only reflects actual display name and not ID + Name.

Bind DropDownByIndex "texts" property to attribute DisplayName.

Now in any action handler (even in OnSelect of DropDownByIndex itself) you may get currently selected record and hence ID:


wdContext.node<yourNodeName>().current<yourNodeName>Element().getID();

Valery Silaev

EPAM Systems

http://www.NetWeaverTeam.com

Answers (0)