Question john.smith4237 · Oct 22, 2024

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

Comments

David Hockenbroch · Oct 22, 2024

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=?"

0
john.smith4237  Oct 22, 2024 to David Hockenbroch

Thanks David, will see what I can do with textboxes 
Cheers 

0