Unique values in column

A common technique for creating lists of unique values is to create a set and pass that set to the list function.

In your boilerplate example, that might look something like:

def drop_down_1_show(self, **event_args):
    """This method is called when the DropDown is shown on the screen"""
    searchitem = list({(r['Ejendom'],r) for r in app_tables.inst.search()})
    self.drop_down_1.items = searchitem

(I converted your original list comprehension to a set comprehension and passed that to the list function).

2 Likes