Showing results for 
Search instead for 
Did you mean: 

Set key-value and display-value to dropdown control items.

In the case of an existing database where foreignkeys are used. It is required to be able to set the display-value the items of a dropdown-box so the ID is used to set the value of a field but the Description is used to display a user-friendly display-name.



Person-table {PersonID, PersonName, GenderID}

Gender-table {GenderID, GenderLabel}


The items property of the dropdown for Person.GenderID will be [Gender]

the value-property for Items will be GenderID, but I need a Display-value property to set the GenderLabel so the user does not see the Identifier, but he sees the GenderLabel

Status: New
New Member

This feature is a must-have, I had to concat the name and id, and then parse the id in our rest API. I don't want to rely on matching strings basically.

Super User

Hi Guys,


I have a solution with images.  If you have a dropdown of Key/Value pairs like so...


You set the Items Property of the DD in this manner...

Table({Text:"",Val:Blank()},{Text: "CycleCount", Val:2},{Text: "Issue", Val:4},{Text: "Receipt", Val:3})

Note: the first possible selection is a Blank to allow a null entry.

The "Text" is visible to the enduser and the Val is on the back end.




To save the Val I use the patch.




TranTypeID is the name of my SQL column.

TransTypeDD is the name of my dropdown.

.Selected is a property of the dropdown and Val is defined in the table I created above.


This method works...It's not as simple as SubmitForm(formname).  But if you are using a custom control the patch statement works.

Regular Visitor

This is actually possible but very cumbersome. You need to manipulate 3 different attributes (Items, Default and Update). See video below at the 8:45 mark. The guy is doing that for a SQL backend but I've done it for in memory collections, etc. I definitely vote for an easy way to do this.