Best way to pull data into Simple List viewer


I have a table in Xano called Retailer (fields - Name and Id) and am using an API to pull the data and display in a Simple List Viewer sorted by name.

Once a name is selected, I want to search another table (fields - id, location_name, retailer_id) for the locations of the retailer. The way I prefer to search this table is by the retailer_id rather than by name, but the only information that the Simple List viewer holds is the name and the index (and the index does not necessarily match the retailer_id).

Is there any way to substitute a variable for the index in the Simple List Viewer?



There is no automated way to do this. You’ll need to search the second table for the value from the green [item] block from the Simple List Viewer click event. You can use the [find first occurrence] of block to figure out which row it is found in and then use that value (integer) as the row id to get the other values from that same row.