Question
· Mar 27

dataCombo not working after conversion

Hi Guys,

I've upgraded from Ensemble 2014 to 2018 and copied all classes across, ran Upgrade & CompileAll and looks fine, but when trying to search on dataCombo I get the below error  

here is the definition of the Combo

<dataCombo id="dcLoc" enclosingStyle="font-size:14px;padding-bottom:5px;" placeholder="Choose Locations" controlClass="textLogin" valign="middle"  buttonImage="images/expand-v2.png" buttonImageDown="images/expand-v2.png" OnCreateResultSet="getLocations" 
searchKeyLen="15" editable="true" valueColumn="1" displayColumns="2,3"/>
 

 

and here is the Search method

Method getLocations(Output sc As %Status, pInfo As %ZEN.Auxiliary.QueryInfo) As %ResultSet
{
If $ZCVT($Username,"U")="ISAACAG"{
Set sql="Select Id,Name As FacName,State->Name As StateName from MSDS_COM.Loc where Name='Aguas Araucania Angol'"
}Else{
Set sql="Select Id,Name As FacName,State->Name As StateName from MSDS_COM.Loc where IsAState=1 and Active=1 "
Set:$ZCVT($username,"U")="ALLIED" sql=sql_"and name like 'bmc%'"
Set:$ZCVT($username,"U")="IUDEX" sql=sql_"and name = 'IUDEX_ENTERPRISE'" }
Set searchkey=$Get(pInfo.parms(1))
If searchkey'=""&($ZCVT($Username,"U")'="ISAACAG")
{
Set sql="Select Id,Name As FacName,State->Name As StateName from MSDS_COM.Loc where IsaFacility=1 and Active=1 "
Set sql=sql_" and Name like "_pInfo.QuoteSQL("%"_searchkey_"%")
Set:$ZCVT($username,"U")="ALLIED" sql=sql_" and state->Name like 'bmc%'"
Set:$ZCVT($username,"U")="IUDEX" sql=sql_"and state->name like 'IUDEX%'"
}
Set sql=sql_" order by Name asc"
Set ^Track("SelectLoc")=sql
Set RS=##class(%ResultSet).%New()
Set Ret=RS.Prepare(sql)
Set Ret=RS.Execute()
Quit RS
}

 

 

Thanks

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