cancel
Showing results for 
Search instead for 
Did you mean: 

Default value in Dropdown by key.

Former Member
0 Kudos

Hello Experts,

I am developing an application in which I want the default location of the logged in user to come in the drop down.

The location here means the personnel subarea. One employee can be in different location of the same company. The drop down should contain all the previous locations of the employee,but default should be his/her current location.

Please advice me on this.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Pratibhas,

If your question was to know how to get all the previous locations in the dropdown, this is a possible way to do it:

1) Create a context node 'Node1' with attribute 'Location' bind the dropdown by index UI element's text property to the attriute 'Location'.

2) Create a supplymethod 'FILLNODE" for this node .

3) To get the previous location write the logic in the Supply method 'FILLNODE' set the value set of the dropdown.

I hope it helps.

Please revert in case of doubts/issues.

Regards,

Sumit

gill367
Active Contributor
0 Kudos

hi

you can use dropdown by index and then fill the node with elements having all the places.

After that set the lead selected element as the one showing current location.

Thanks

Sarbjeet

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

What kind of advice do you need? Do you want to know where you can get this data or just how to set a defaul value in a drop down by key? If the later, that is quite simple. The DDLBByKey is bound to a context attribute. This context attribute contains the currently selected value in the DDLB. If you want to set a default value, simply update this bound context attribute with the value you want.