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

**URL:** <https://community.thunkable.com/t/pass-variable-from-json-response-to-list-view-click-but-hide-from-displaying/2586662>\
**Category:** Questions about Thunkable X\
**Created:** [September 9, 2023, 9:26pm UTC](https://community.thunkable.com/t/pass-variable-from-json-response-to-list-view-click-but-hide-from-displaying/2586662 "2023-09-09T21:26:31Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![steve\_synopsis](https://avatars.discourse-cdn.com/v4/letter/s/48db29/32.png) [@steve\_synopsis](https://community.thunkable.com/u/steve_synopsis)\
**Post date:** [September 9, 2023, 9:26pm UTC](https://community.thunkable.com/t/pass-variable-from-json-response-to-list-view-click-but-hide-from-displaying/2586662/1 "2023-09-09T21:26:32Z")

</div>

Hi,

I have 2 tables in Xano -

![2023-09-09 17 23 09](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/d/a/dad1e81dd0e673ba60f3dd5a227a90580523837d.png)

 ![2023-09-09 17 24 26](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/d/5/d597221d5a6daf431614d183ea493010669464ad.png)

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?

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [September 9, 2023, 11:10pm UTC](https://community.thunkable.com/t/pass-variable-from-json-response-to-list-view-click-but-hide-from-displaying/2586662/2 "2023-09-09T23:10:32Z")

</div>

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`.

---

<div class="post-metadata">

**Author:** ![steve\_synopsis](https://avatars.discourse-cdn.com/v4/letter/s/48db29/32.png) [@steve\_synopsis](https://community.thunkable.com/u/steve_synopsis)\
**Post date:** [September 10, 2023, 12:04am UTC](https://community.thunkable.com/t/pass-variable-from-json-response-to-list-view-click-but-hide-from-displaying/2586662/3 "2023-09-10T00:04:34Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [September 10, 2023, 3:19am UTC](https://community.thunkable.com/t/pass-variable-from-json-response-to-list-view-click-but-hide-from-displaying/2586662/4 "2023-09-10T03:19:24Z")

</div>

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).

---

<div class="post-metadata">

**Author:** ![steve\_synopsis](https://avatars.discourse-cdn.com/v4/letter/s/48db29/32.png) [@steve\_synopsis](https://community.thunkable.com/u/steve_synopsis)\
**Post date:** [September 10, 2023, 2:44pm UTC](https://community.thunkable.com/t/pass-variable-from-json-response-to-list-view-click-but-hide-from-displaying/2586662/5 "2023-09-10T14:44:04Z")

</div>

Ok,

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!!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/f/0f59f292712368bce16ff80133ae10de8a6f27e8.png) [@system](https://community.thunkable.com/u/system)\
**Post date:** [December 9, 2023, 2:44pm UTC](https://community.thunkable.com/t/pass-variable-from-json-response-to-list-view-click-but-hide-from-displaying/2586662/6 "2023-12-09T14:44:40Z")

</div>

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