wtgeographer

How do I use selection from one combobox and filter it from second?

Discussion created by wtgeographer on Apr 18, 2014
Latest reply on Apr 24, 2014 by Eddie63
I have two combobox's both using search cursor on same field to populate combo box.  The code below is used to populate both boxes from this field. How do I use selection from first and filter it from second search cursor?  Thanks in advance.

class ComboBoxClass3(object):
    def __init__(self):
        mxd = arcpy.mapping.MapDocument("CURRENT")
        df = arcpy.mapping.ListDataFrames(mxd)[0]
        layer = arcpy.mapping.ListLayers(mxd, "SPS_Substations", df)[0]
        sc = arcpy.SearchCursor(layer)
        for row in sc:
             self.items.append(row.getValue("Name"))
        self.items.sort()

class ComboBoxClass4(object):
    def __init__(self):
        mxd = arcpy.mapping.MapDocument("CURRENT")
        df = arcpy.mapping.ListDataFrames(mxd)[0]
        layer = arcpy.mapping.ListLayers(mxd, "SPS_Substations", df)[0]
        sc = arcpy.SearchCursor(layer)
        for row in sc:
             self.items.append(row.getValue("Name"))
        self.items.sort()

Outcomes