Hi Guys,
Any Idea on how can make a dynaTree with 4 levels hierarchy (attached), I'm using the below code but sometimes works and other cases it doesn't?
Set locId=..locId,pos=1,(pLineArr,astArr,compArr)=""
&Sql(Select Parent->Name,ID into :Fac,:kLoc from MSDS_COM.Loc where Parent=:locId)
Set:SQLCODE (Fac,kLoc)=""Set pTree(0,"ch",1) = ""Set pTree(1) = $LB(Fac,locId,1,"","")
Set Sql="Select ProductLine from MSDS_Serenity.ProdLineDetails where Active=1 and Loc="_kLoc_" group by ProductLine order by ID"Set RS = ##class(%ResultSet).%New()
Do RS.Prepare(Sql)
Do RS.Execute()
While
.png)