Working with PopUp Menus – Programming with XOJO

This particular problem has been a long time coming for an answer. The goal is simple–Populate a PopUp menu with values from a SQL table, then select the value in that PopUp with a result from an SQL query. Here’s my solution:

You’ll notice that the solution is not clean. Is there a way to select a value in a popup based on the value of the item’s RowTag? NO! (If there is please let me know). What I wound up doing was store the value of ListIndex in the table and select based on the queried ListIndex.