# \[SOLVED\] Issue with button binding in advanced data list viewer

**URL:** <https://community.thunkable.com/t/solved-issue-with-button-binding-in-advanced-data-list-viewer/917384>\
**Category:** Questions about Thunkable X\
**Created:** [October 20, 2020, 3:12pm UTC](https://community.thunkable.com/t/solved-issue-with-button-binding-in-advanced-data-list-viewer/917384 "2020-10-20T15:12:04Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)\
**Post date:** [October 20, 2020, 3:12pm UTC](https://community.thunkable.com/t/solved-issue-with-button-binding-in-advanced-data-list-viewer/917384/1 "2020-10-20T15:12:04Z")

</div>

I am having issues using binding appropriately. I have made a repeateable componenet that has a button with a background picture (the heart). i have removed the text, and made the background of the button translucent.

 ![Screen Shot 2020-10-20 at 11.10.10 AM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/e/2/e2cb277efe098b1810f0bf2af66b9796528059f4.png)

### but, when i save the entire column as a repeatable component.

 ![Screen Shot 2020-10-20 at 11.10.51 AM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/a/9/a9c103fd1e25e57aa7ecdc4e3055c85d4908c876.png)

### this is what is saved. and this is what it produces when used

 ![IMG_05DE4ADEFA36-1](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/b/7/b793dda71666173eca626003cd384f236918995f.jpeg)

### to be clear, i can set the background picture in the repeated element. the issue though is that the blue background and word ‘button’ shouldnt be there.

how do i get rid of these?  
@Steven

[UPDATE]  
I had not changed the background color of the button.  
that’s fixed.

for button text, instead of leaving it as ‘undefined’ i simply entered 1 space.  
that’s fixed now!

 ![IMG_63F945767E61-1](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/8/8/88ce68b695e9b67cbdda886ec8959cdc0e03d5b6.jpeg)

---

<div class="post-metadata">

**Author:** ![athornock](https://avatars.discourse-cdn.com/v4/letter/a/b4bc9f/32.png) [@athornock](https://community.thunkable.com/u/athornock)\
**Post date:** [October 25, 2020, 4:58pm UTC](https://community.thunkable.com/t/solved-issue-with-button-binding-in-advanced-data-list-viewer/917384/2 "2020-10-25T16:58:01Z")

</div>

@jared how are you passing data from your button to your blocks so that you can tell which City is being favorited?

---

<div class="post-metadata">

**Author:** ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)\
**Post date:** [October 26, 2020, 3:33am UTC](https://community.thunkable.com/t/solved-issue-with-button-binding-in-advanced-data-list-viewer/917384/3 "2020-10-26T03:33:54Z")

</div>

I havent figured that out, not with a listviewer. Instead, I do this  
 ![Screen Shot 2020-10-25 at 11.32.11 PM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/8/c/8c41c55e75e8dc5cdb1ca2049d3c2672c96826f0.png)

and this

 ![Screen Shot 2020-10-25 at 11.33.01 PM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/5/7/5725d9712459d4fac807d1592722596a84cf90b3.png)

currently, you have to click into the picture to ‘like’ it.

if the objects were cloned its much easier IMO. @steven, is there a way to figure out which component is clicked, or is there a way to correspond a button to a repeated item?

---

<div class="post-metadata">

**Author:** ![athornock](https://avatars.discourse-cdn.com/v4/letter/a/b4bc9f/32.png) [@athornock](https://community.thunkable.com/u/athornock)\
**Post date:** [October 26, 2020, 2:15pm UTC](https://community.thunkable.com/t/solved-issue-with-button-binding-in-advanced-data-list-viewer/917384/4 "2020-10-26T14:15:15Z")

</div>

You can figure out which button is pressed in any of the items by using something like the font or background color (and a transparency of 0). But I can’t figure out how to tell which row is clicked of that button. So in short, no, I haven’t been able to figure it out.

---

<div class="post-metadata">

**Author:** ![Steven](https://avatars.discourse-cdn.com/v4/letter/s/94ad74/32.png) [@Steven](https://community.thunkable.com/u/Steven)\
**Post date:** [October 26, 2020, 4:51pm UTC](https://community.thunkable.com/t/solved-issue-with-button-binding-in-advanced-data-list-viewer/917384/5 "2020-10-26T16:51:23Z")

</div>

What @athornock suggested is a possible solution. I’m not sure if this is what you’re asking but I believe if you have a button inside of your data viewer layout there should be an on click block for that button which passes the id of the item that was clicked. This is an example with a label but the same should be true for the button. You can find these blocks by expanding the Data\_Viewer\_List1 (or whatever you’ve named yours) in the blocks toolbox and then finding the relevant component.

![Screen Shot 2020-10-26 at 9.45.45 AM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/1/0/108a25eb8349f2d96c31723abba7e24670cca645.png)

There should also be a block to get the entire object by the rowId if you want to use that. It might be faster.

Can you clarify what you mean by `is there a way to correspond a button to a repeated item`?

---

<div class="post-metadata">

**Author:** ![drted](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/drted/32/92694_2.png) [@drted](https://community.thunkable.com/u/drted)\
**Post date:** [October 26, 2020, 5:05pm UTC](https://community.thunkable.com/t/solved-issue-with-button-binding-in-advanced-data-list-viewer/917384/6 "2020-10-26T17:05:17Z")

</div>

A technique I have used is to create a button transparent text with a font size of 0.1. Then the text can be “decoded” to determine which row was selected.

---

<div class="post-metadata">

**Author:** ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)\
**Post date:** [October 26, 2020, 5:13pm UTC](https://community.thunkable.com/t/solved-issue-with-button-binding-in-advanced-data-list-viewer/917384/7 "2020-10-26T17:13:26Z")

</div>

Thanks for the response Steve!

Here are the options i have available. I only get rowID, nothing related to the button i have in the repeated item. I guess you could do a vlookup? from all rowID’s, find position of current rowID, this would correspond to the button clicked on if there was only 1 button per row i think.

![Screen Shot 2020-10-26 at 1.11.31 PM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/8/b/8bb8945788fdc6920ecf2cecbfb87e11e0aa2c5a.png) ![Screen Shot 2020-10-26 at 1.11.38 PM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/4/3/435463a0a16379ad491eccb11de8ddb328216b77.png)

---

<div class="post-metadata">

**Author:** ![Steven](https://avatars.discourse-cdn.com/v4/letter/s/94ad74/32.png) [@Steven](https://community.thunkable.com/u/Steven)\
**Post date:** [October 26, 2020, 5:20pm UTC](https://community.thunkable.com/t/solved-issue-with-button-binding-in-advanced-data-list-viewer/917384/8 "2020-10-26T17:20:37Z")

</div>

Sorry, what I mean is that your button should have a unique on click event. You should see this under the `Data_Viewer_List1` component in the blocks toolbox (towards the bottom left of the image below). I included a picture with a simple example showing the label from my previous post. If you use this method you should know both which button was clicked (if you have multiple) and which row Id is affiliated with this button. Does that make sense? Do you have the ability to expand the DV List to view the child components? It is possible I’m misunderstanding your question as well so I apologize if that is the case. If so, it might be helpful for you to walk me through the whole process that you’re trying to accomplish so I can better understand how to help.

 ![Screen Shot 2020-10-26 at 10.14.05 AM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/f/c/fcb665f9f1216fd181c595e0e2d3550458f3a832.png)

---

<div class="post-metadata">

**Author:** ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)\
**Post date:** [October 26, 2020, 5:24pm UTC](https://community.thunkable.com/t/solved-issue-with-button-binding-in-advanced-data-list-viewer/917384/9 "2020-10-26T17:24:17Z")

</div>

![source](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/a/1/a13d9fe9e2eb4c5b585a9f99ddd62e3f01df2850.gif)

---

<div class="post-metadata">

**Author:** ![athornock](https://avatars.discourse-cdn.com/v4/letter/a/b4bc9f/32.png) [@athornock](https://community.thunkable.com/u/athornock)\
**Post date:** [October 26, 2020, 5:40pm UTC](https://community.thunkable.com/t/solved-issue-with-button-binding-in-advanced-data-list-viewer/917384/10 "2020-10-26T17:40:38Z")

</div>

Thank you @Steven! I didn’t think to look there.

---

<div class="post-metadata">

**Author:** ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)\
**Post date:** [November 8, 2024, 12:21pm UTC](https://community.thunkable.com/t/solved-issue-with-button-binding-in-advanced-data-list-viewer/917384/11 "2024-11-08T12:21:54Z")

</div>


