# Using Data List Viewer

**URL:** <https://community.thunkable.com/t/using-data-list-viewer/2535780>\
**Category:** Questions about Thunkable X\
**Tags:** design, help, coding, data-viewer\
**Created:** [August 7, 2023, 11:31pm UTC](https://community.thunkable.com/t/using-data-list-viewer/2535780 "2023-08-07T23:31:03Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![brian.youngren](https://avatars.discourse-cdn.com/v4/letter/b/779978/32.png) [@brian.youngren](https://community.thunkable.com/u/brian.youngren)\
**Post date:** [August 7, 2023, 11:31pm UTC](https://community.thunkable.com/t/using-data-list-viewer/2535780/1 "2023-08-07T23:31:03Z")

</div>

I am attempting to design a Football Stats app for in-game use while on the radio. I want to have the app create a table I can see on the next Screen that shows a player’s number, how many catches they have, and the total yards that player has (#85 - 5 catches for 50 yards). This list would need to be viewed at halftime and the end of the game and updated throughout. I have a screen that tacks all the basic team stats. If you view my app you will see on Screen 1 the QB#, YDS WR# that then has a completion Button. It would need to Use the WR# Text, YDS Text, and add one to the catches when that button is clicked. Basically, I need lots of help and I have little explanation but I can show you via my app if I know how to share it via this question. Try this link to view, Thank you I am really frustrated. [Thunkable](https://x.thunkable.com/projectPage/64d17df13135b0118328a578)

---

<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:** [August 8, 2023, 12:29am UTC](https://community.thunkable.com/t/using-data-list-viewer/2535780/2 "2023-08-08T00:29:49Z")

</div>

What is your specific question? Are you just wanting to know how to add one to a variable value when a button is clicked? It helps if you’re specific about the difficulty you’re having.

---

<div class="post-metadata">

**Author:** ![brian.youngren](https://avatars.discourse-cdn.com/v4/letter/b/779978/32.png) [@brian.youngren](https://community.thunkable.com/u/brian.youngren)\
**Post date:** [August 8, 2023, 12:46am UTC](https://community.thunkable.com/t/using-data-list-viewer/2535780/3 "2023-08-08T00:46:34Z")

</div>

Thank you for helping. When a play happens the player has a number and will gain or loose yards. When that happens I need the list view to either create that line of data or update the existing one by the players number. When a pass is thrown, The QB# is entered along with the Yardage gained and the WR# that made the catch. The WR# that made the catch would need his data line catches plus one and the yardage gained. The QB# will have a total yards as well and a completion. This should all happen and then be able to see the list on the Halftime and End of Game Screen. I hope that explains it. That is also part of my frustration. Not explaining it to well and failing misserably.

---

<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:** [August 8, 2023, 6:50am UTC](https://community.thunkable.com/t/using-data-list-viewer/2535780/4 "2023-08-08T06:50:03Z")

</div>

I get the overall idea for the app. One problem is that you’re asking about too much at once. It’s easiest to help you if you narrow your question to one step you’re trying to complete.

---

<div class="post-metadata">

**Author:** ![brian.youngren](https://avatars.discourse-cdn.com/v4/letter/b/779978/32.png) [@brian.youngren](https://community.thunkable.com/u/brian.youngren)\
**Post date:** [September 6, 2023, 10:31pm UTC](https://community.thunkable.com/t/using-data-list-viewer/2535780/5 "2023-09-06T22:31:33Z")

</div>

I have updated my app a bit attempting to show what I am trying to do. I hope. I have it broken into 4 pieces now I hope. Here is screenshot of what I am trying to do. It will be offline so I will need to store data locally. I am using a Local DB I believe. I will need a way to show that data at some points well. Basically I need the table to create a players number row if they do not exist and update it if it does. Thank you for attempting to help.

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/b/9/b9c725cf3dea409630a9bc9751e18f8f676d7261.png)

---

<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 7, 2023, 5:33pm UTC](https://community.thunkable.com/t/using-data-list-viewer/2535780/6 "2023-09-07T17:33:29Z")

</div>

You might find my response and this whole topic to be useful in terms of setting up an if/else block:

> [@Finding the correct 'row ID'](https://community.thunkable.com/t/finding-the-correct-row-id/2581368/4):
>
> My approach would be to assign a variable such as app variable foundRowNum to the find first occurrence of block to search the list of values in the email column for the user’s email address. That block returns a 0 if nothing is found and an integer representing the row number where it’s first found in the column if it does find it. So you can use the result in an if/else block to say if that variable is greater than zero, update the value in row id [app variable foundRowNum] … else create row.

---

<div class="post-metadata">

**Author:** ![brian.youngren](https://avatars.discourse-cdn.com/v4/letter/b/779978/32.png) [@brian.youngren](https://community.thunkable.com/u/brian.youngren)\
**Post date:** [September 20, 2023, 2:30am UTC](https://community.thunkable.com/t/using-data-list-viewer/2535780/7 "2023-09-20T02:30:07Z")

</div>

Does this appear to be heading in the right direction? I feel like it is time to give up and move on. Thank you  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/4/e/4ec6edb4c235cb6c81af53903469f80ac3fa67d6.png)

---

<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 20, 2023, 2:43am UTC](https://community.thunkable.com/t/using-data-list-viewer/2535780/8 "2023-09-20T02:43:01Z")

</div>

You said earlier:

> [@brian.youngren](#):
>
> Basically I need the table to create a players number row if they do not exist and update it if it does.

It looks promising to me… does it work as you expect it to? If not, you might try checking for the number of rows in the database to equal zero (0) instead of the list of values being empty. Typically, I would search the database to see if the WRText’s Text already exists in the Player value column. If not, create a row. If so, update that row.

One problem I see if that you’re trying to use the WRText’s Text as the row id. That will fail. It needs to be an integer or you can store the green row id value each time you create a row. But I would probably skip that and – like I said above – search for the Player value and use the row # where you find it as the row id in the `update value` blocks.

---

<div class="post-metadata">

**Author:** ![brian.youngren](https://avatars.discourse-cdn.com/v4/letter/b/779978/32.png) [@brian.youngren](https://community.thunkable.com/u/brian.youngren)\
**Post date:** [September 20, 2023, 10:42pm UTC](https://community.thunkable.com/t/using-data-list-viewer/2535780/9 "2023-09-20T22:42:22Z")

</div>

Not sure. I need to start that part over. I did something and the whole thing blew up and I have to trace out what I screwed up. Thank you.

---

<div class="post-metadata">

**Author:** ![brian.youngren](https://avatars.discourse-cdn.com/v4/letter/b/779978/32.png) [@brian.youngren](https://community.thunkable.com/u/brian.youngren)\
**Post date:** [September 27, 2023, 2:07am UTC](https://community.thunkable.com/t/using-data-list-viewer/2535780/10 "2023-09-27T02:07:54Z")

</div>

I am not sure how close I am progressing but here is a screenshot of what I have and what it did. It makes the list start but does not give any number other than the first one I enter and as you can see it is not doing the math.

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/8/6/86e9c782b668e78b730ef14133f8c211a770bce2.png)

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/b/f/bf81667fb2e66e1755b893e1699deacdb77f3ee1.png)

---

<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 27, 2023, 5:38am UTC](https://community.thunkable.com/t/using-data-list-viewer/2535780/11 "2023-09-27T05:38:21Z")

</div>

One thing I noticed right away is that you have two different event blocks for when CompletionButton is clicked. That’s generally not a great idea because it’s hard to keep track of what happens when. In your case, you’re setting the PassYrds’s Text to “” (empty string) whether or not the PassYrds’s Text = “”. So no matter what, as soon as you click that button, it’s going to empty out that label. But then you’re trying to use that same value (PassYrds’s Text) for the Yards value in your `create row` block. So it’s just going to add nothing every time. The same goes for the `update value` block. That might be the cause of the “NaN” value you’re getting (Not A Number).

---

<div class="post-metadata">

**Author:** ![brian.youngren](https://avatars.discourse-cdn.com/v4/letter/b/779978/32.png) [@brian.youngren](https://community.thunkable.com/u/brian.youngren)\
**Post date:** [September 27, 2023, 11:05pm UTC](https://community.thunkable.com/t/using-data-list-viewer/2535780/12 "2023-09-27T23:05:18Z")

</div>

That is correct. If I bump that button and there are not yards entered, it makes no entry. I put everything into one button, but it does not work. I will continue to work on it for a bit and see what I can come up with. Thank you

---

<div class="post-metadata">

**Author:** ![brian.youngren](https://avatars.discourse-cdn.com/v4/letter/b/779978/32.png) [@brian.youngren](https://community.thunkable.com/u/brian.youngren)\
**Post date:** [October 10, 2023, 10:29pm UTC](https://community.thunkable.com/t/using-data-list-viewer/2535780/13 "2023-10-10T22:29:38Z")

</div>

I am getting closer. How can get the data from the table to show up a certain way in a line with some labels. For example the players number is 5. So it should read across #5 1 Recs for 5 Yards.

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/6/d/6df145841876beb568b41fbd80ade53f6eee984a.png)

I also need to understand how to update a row and add to what is already in it. I feel better as if I am getting closer to my goals… Thank you

![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/1/1/1178889d1c52de0ae148c5035cb6224d0cc440d4.png)

---

<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:** [October 11, 2023, 2:19am UTC](https://community.thunkable.com/t/using-data-list-viewer/2535780/14 "2023-10-11T02:19:32Z")

</div>

If you want a different layout for your Data Viewer List, then you’ll need to create a custom layout. You can update individual cells with the [update value] block or you can delete the existing row and create a new one to replace the entire row at once.

---

<div class="post-metadata">

**Author:** ![brian.youngren](https://avatars.discourse-cdn.com/v4/letter/b/779978/32.png) [@brian.youngren](https://community.thunkable.com/u/brian.youngren)\
**Post date:** [October 25, 2023, 2:50am UTC](https://community.thunkable.com/t/using-data-list-viewer/2535780/15 "2023-10-25T02:50:52Z")

</div>

I have watched some videos and tried a number of things. My latest effort has come up with this. All of the videos are switching screens. I would prefer not to do that and just have it happen in the background until I need to view it. I have also tried to find the custom layout for data list viewer with no luck. Always wants a picture.

 ![Screen Shot 2023-10-24 at 8.50.03 PM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/7/07ffd0990bde318cd05522717856074c363721e4.png)

---

<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:** [January 23, 2024, 2:51am UTC](https://community.thunkable.com/t/using-data-list-viewer/2535780/16 "2024-01-23T02:51:08Z")

</div>

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