AnsweredAssumed Answered

Creating a checkbox tree to define constants for a where clause

Question asked by schlot on Mar 13, 2015
Latest reply on Mar 23, 2015 by schlot

I need to figure out how to set up check boxes to choose values to query from a data layer.  Some of the values will be a single category, such as 'Audiologist' or "Orthopedist'.  But there will also be a category that is more of a group "Mental Health", that might have subcategories of 'Alcohol',' Narcotics'


If I could organize this using a checkbox tree, then the items that had subcategories could be grouped under a single item in the tree, which the ones that didn't would just be a one line with a checkbox.  I think this would give a cleaner look to the interface. 


This is obviously exactly what's going on with the TOC, but I'm not dealing with layers. The Values will remain constant and I don't think I'll have even a dozen to deal with.  Once the user makes their selection, then I can use the values to create a where clause and then either a queryTask or a selectFeatures on featureLayer.  That results of the query will go into a grid.  What I'm envisioning isn't a TOC, or I'd just use that. 


I'm having a hard time finding a good example of the checkbox tree.  I found this site, but it's enough out of date that the code isn't working for me.   I vaguely remember a POI example on the ESRI site from a couple years back, but I can't find a working example of that either.


If anyone has a better suggestion, I'd like to hear it.