Skip to main content

Displaying multiple fields for one record in a combo box

Comments

1 comment

  • Sean McClurkan

    The best answer is one you probably won't like - normalize the data at its source.  If you create an intersection table where street_id_one and street_id_two represent every intersection, your combo box need only cascade the one time to show every possible intersection.   Apply a unique key to both columns and every relationship can be accounted for without repetition. 

    Alternatively, we have a point featureclass used to identify every intersection. The unique and persistent ID of these points is then related to the unique and persistent ID of every street name that comes together there in a single child table - intersection_street .  This allows an unlimited number of street names to be related to any intersection (as opposed to adding a new column when six streets need to intersect - it happens).

    In either case, your first combo box selects a valid street from your streets, then the second combo box selects all the valid streets where street_id is in either column of the child table.  I suggest creating a database view of the child table joined to the street source to resolve the names and other attributes from the street source.  Using this view for the combo box should provide a pretty list for the user to select from.

    0

Please sign in to leave a comment.