Question
· Oct 22

Get description in dataBinding

Hi Guys,

Given that Analyst property is defined as class object I'm getting the Analyst ID in the below dataBinding, but I'm looking to display the Analyst name, I tried  using dataBinding="Analyst->Name" but no luck, I got the same issue when binding to  dataCombo or comboBox ?     

<text dataBinding="Analyst" id="AnalystName" label="Analyst Name:" size="36" />
 

Thanks

Product version: Ensemble 2018.1
Discussion (2)1
Log in or sign up to continue

If you use a dataCombo, the first column of the SQL query is the actual value of the dataCombo and the second column is the display value. So if you defined a dataCombo with sql="select Analyst, Analyst->Name from Analysts" (or whatever your table is) you'll get what you want.

In that case, you'll also want to define the sqlLookup property of the dataCombo. That tells the Zen page how to find the correct display value when the value of the control is changed programatically, so something like "select Analyst->Name from Analysts where Analyst=?"