I’m using the following statement to get data from a db into a dhtmlx tree:
<cfset request.tree.render_sql(“processID,processUID,processLabel,processParentID,processSortOrder,processLevel,processVersion FROM ao_process WHERE CompanyID=‘#session.user.companyID#’ AND processStatus = #status# ORDER BY processSortOrder ASC”,“processID”,“processLabel”,“processSortOrder”,“processParentID”, “processUID”, “processVersion”)>
the issue is that i have multiple records with the same processid to show up in the tree under the same processparentid. this shows as in the attachment. the childs of a processID are showing three times (i have three items with the same processID) under one parent, and the duplicates don’t have an ID when i click on the item in the tree. so they are not working. they give me an “undefined”.
See attached marked with “X”
i would like to :
- have the second and third item in the tree to be clickable
- have the child items to show up under the second and third item
See attached image “2.png”
How can i achieve this?
Can i use another/custom query? Or do i need to modidy the query? Or do i use an beforerender to do this?