cancel
Showing results for 
Search instead for 
Did you mean: 

drop down by key in table cell

Former Member
0 Kudos

Hello

I have a table where the cells for one column are drop down by key. I need that every drop down to have different values, but now the column show the same list for drop downs. I need to use drop down by key and not drop down by index.

Thank you

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

This cannot be done with DropDownByKey because the data type of the cell editor is the same for all rows of the editor's column.

Armin

Answers (3)

Answers (3)

Former Member
0 Kudos

Hello Valery

In that table every line is a search criteria for hospital appointments. There is a column for clinic and one for doctors. Every clinc has a doctor list. When I choose the clinic, the drop down list for doctor is filled. I can display the doctor name, but practicaly the program works with doctor's id. If I use drop down by key, I have those id's, but the list is the some in all cells. If I use drop down by index, I need to do some processing to find the id's.

We found a solution for drop down by index: to put in list a string with doctor name and id, not only the name. When a doctor is selected, we split the string to find the id, and do the settings.

For context: there is the model node (X) to display the input table. X has model attributes, and a subnode (Y) with cardinality 0-n, initializeLineSelection = false, selection 1-1, singleton = false.

Do you have other idea?

Georgiana

Former Member
0 Kudos

Hi,

If your context node has the id and the name, when the name is selected that element becomes the 'current' element for the node. You should then be able to ask the current element for the id.

Cindy

Former Member
0 Kudos

Georgeta,

What I will suggest is the following structure:


 - Context
   - Clinics (0..n, singleton, any selection type)
     <id>
     <title>
     <...>
     - Doctors (0..n, non-singleton, 0..1 or 1..1 selection)
       <id>
       <fullName>
       <...>   

Now you have to create supply function for Doctors node, and move your current code that populates <doctor> attribute SVS here (changes are minimal -- just create node element instead of SVS entry by parentElement -- it will be ClinicsElement in your case)

On submit you may check currently selected element of Doctors node for every element in Clinics node and get Doctor's id.

Valery Silaev

EPAM Systems

http://www.NetWeaverTeam.com

Former Member
0 Kudos

Georgeta,

In fact you have to use DropDownByIndex -- this is a WD requirement fro your scenario.

Tell us more why you have to use DropDownByKey (namely, what nodes are used in related context) -- probably there is a way to alter / enhance context structure to support DropDownByIndex.

Valery Silaev

EPAM Systems

http://www.NetWeaverTeam.com

Former Member
0 Kudos

Hi Georgeta,

You can decide which UI you want to use dropdown or dropdownbyindex.

I am not sure what you expect from us by saying

"<i>I need to use drop down by key and not drop down by index</i>"

If your all dropdown UI's bind to one data source they will show the same list and same value would be selected.

If you want different values selected in different DropDowns then you have to progmatically select them before you display the screen.

Message was edited by: Baskaran Senthivel