DropDown data from Named Query, (String found, object expected)

Hello!

For a dropdown I getting data from a Named Query and modify it so I just keep one column to show on the dropdown

def transform(self, value, quality, timestamp):

    # Convert the dataset to a Python list of dictionaries
    headers = value.getColumnNames()
    data = []
    
    for row in range(value.getRowCount()):
        row_dict = {headers[col]: value.getValueAt(row, col) for col in range(value.getColumnCount())}
        data.append(row_dict)
    
    # Extract the 'sedes' column from each row
    result = [row['sedes'] for row in data if 'sedes' in row]
    return result

But the dropdown is showing me this error message:
image

image

There is any workaround to solve this???

Your final output is a simple list of strings. It needs to be a list of dictionaries, each containing label and value keys.

1 Like

Yes, I just modify the query so it gives me just the column I needed. Thanks!