Pass variable from JSON response to list view click but hide from displaying


I have 2 tables in Xano -

2023-09-09 17 23 09

In my first screen, I run a Xano API endpoint query to get the names from the Vendors tables which is stored in a list and displayed in the List Viewer.

When the user clicks a Vendor, I want to be able to pass the VendorId to the next screen where another API endpoint will pull the locations for that vendor. However, I prefer to use the Vendor Id to do the search rather than the Vendor name.

I know that I can pull the Vendor Id the same time that I pull the name, but I do not want to display it in the list viewer.

Is it possible to extract it before I present the List Viewer and store it in a variable?

If I’m understanding you correctly, when the user clicks an item in the IstRetailers list viewer, you want to assign the retailerId for that item in a variable. So as an example, if the user clicked “Atlanta”, you’d want to assign the value “5”.

If that’s the case, then that’s exactly what the green index block is for. It gives you the row number of the item that was clicked. So you can then set app variable selectedRetailerId to get data source value “retailerId” from row id index.

Understood about the index but in some other tables I may have more than 1 id that I want to pull. So for example another table - product has brandid, categoryid and retailerid fields.

What then?

Those are just column headers, right? So you still use the index block as the row id. You just use multiple “get value” blocks. Or you get the row object and then get various properties from that (which I find more complicated but it’s really not).


I think that I have it. I will capture the index as a variable and in the next screen, use a API GET query for that 1 field searching by the index. I can then get access to the other fields in the record.

Fingers crossed!!

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.