Question
· Apr 17, 2023

Find a specific column in a dataCombo

Hello,

I've the below datacombo definition and when selecting an item from it and make this call:

var component=zen("Component").getProperty("value"); 

I would get the ID (first column) which is what I'm looking for

 

<dataCombo id="Component" name="Component"  align="left" size="30" maxRows="400" 
     sql="select ID, name From MSDS_Serenity.Kit Where (is null or %UPPER(name)[%UPPER(?)) And Loc=AND Active=1 and ParentKit  is not null and (RapidSterTemp != 1 or RapidSterTemp is null) and asset=0 order by name asc
    searchKeyLen="10"
editable="true"
required="false" 
showEmpty="true"
displayColumns="1,2"
choiceColumn="2"
valueColumn="1"
dropdownWidth="230px" onchange="">
<parameter value="?" />
<parameter value="" />
<parameter value="" />
</dataCombo>

 

but when selecting an item from my grid that uses this code to populate the realated value in my dataComb

var cbComponent zen("Component");
cbComponent.setValue(table.getRowData( table.selectedIndex).Component);
 

but now making the same call:

var component=zen("Component").getProperty("value"); 

I get nothing, so is there a function or attribute in data comb to find the value in a specific column? 

 

 

Thanks

Product version: Caché 2014.1
Discussion (0)1
Log in or sign up to continue