# DVL Layout Wrapper unable to set visibility to false

**URL:** https://community.thunkable.com/t/dvl-layout-wrapper-unable-to-set-visibility-to-false/1347394
**Category:** Questions about Thunkable X
**Created:** [June 16, 2021, 4:52am UTC](https://community.thunkable.com/t/dvl-layout-wrapper-unable-to-set-visibility-to-false/1347394 "2021-06-16T04:52:19Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![codeswept](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/codeswept/32/87755_2.png) [@codeswept](https://community.thunkable.com/u/codeswept)
#### Post date: [June 16, 2021, 4:52am UTC](https://community.thunkable.com/t/dvl-layout-wrapper-unable-to-set-visibility-to-false/1347394/1 "2021-06-16T04:52:19Z")

</div>

I’m trying to loop through all the entries in a DVL and then hide each entry if one of the cells for that row doesn’t match a variable.

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

The 4th row doesn’t match the variable ‘society’, yet it’s still visible. I know that the row IDs are correct because I’m able to fetch a DVL row’s title with that ID. Any ideas on what I’m doing wrong?

This method of hiding rows has always worked for me, and I don’t want to delete rows at all.

Thanks

---

<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: [June 16, 2021, 5:40am UTC](https://community.thunkable.com/t/dvl-layout-wrapper-unable-to-set-visibility-to-false/1347394/2 "2021-06-16T05:40:03Z")

</div>

This works for me:

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

I would first try that, without a loop, to see if you can hide a single row of the Data Viewer List (DVL).

If that works, then the problem is somewhere in your loop. There’s a lot there so it’s not obvious to me what the problem might be.

---

<div class="post-metadata">

### Author: ![codeswept](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/codeswept/32/87755_2.png) [@codeswept](https://community.thunkable.com/u/codeswept)
#### Post date: [June 16, 2021, 5:40am UTC](https://community.thunkable.com/t/dvl-layout-wrapper-unable-to-set-visibility-to-false/1347394/3 "2021-06-16T05:40:35Z")

</div>

Thanks! Let me try that

---

<div class="post-metadata">

### Author: ![codeswept](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/codeswept/32/87755_2.png) [@codeswept](https://community.thunkable.com/u/codeswept)
#### Post date: [June 16, 2021, 5:42am UTC](https://community.thunkable.com/t/dvl-layout-wrapper-unable-to-set-visibility-to-false/1347394/4 "2021-06-16T05:42:05Z")

</div>

No, it doesn’t work. I still see the first entry.

---

<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: [June 16, 2021, 5:42am UTC](https://community.thunkable.com/t/dvl-layout-wrapper-unable-to-set-visibility-to-false/1347394/5 "2021-06-16T05:42:10Z")

</div>

Sure. Also, for debugging purposes, what happens if you change the value of a label right before the second `wait 1 seconds` block? Do you see the change happen?

What happens if you change the label value right after the `set Data_Viewer_List1's LayoutWrapper for...` block? Do you see the change happen?

---

<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: [June 16, 2021, 5:43am UTC](https://community.thunkable.com/t/dvl-layout-wrapper-unable-to-set-visibility-to-false/1347394/6 "2021-06-16T05:43:50Z")

</div>

Then try to get the row ID value. For example, set a label (in my screenshot) to `app variable row ID` and make sure it’s giving you a row ID. There could be a problem with your variable initialization.

---

<div class="post-metadata">

### Author: ![codeswept](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/codeswept/32/87755_2.png) [@codeswept](https://community.thunkable.com/u/codeswept)
#### Post date: [June 16, 2021, 5:44am UTC](https://community.thunkable.com/t/dvl-layout-wrapper-unable-to-set-visibility-to-false/1347394/7 "2021-06-16T05:44:55Z")

</div>

I do see the DVL’s title in my input before the second wait 1 seconds block, so my Row ID is alright. Also, I made the text input change to _done_ after setting the visibility, and I get it in my input.

---

<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: [June 16, 2021, 5:45am UTC](https://community.thunkable.com/t/dvl-layout-wrapper-unable-to-set-visibility-to-false/1347394/8 "2021-06-16T05:45:53Z")

</div>

Good point, yes that means the row ID is working.

I’m not sure! If you want, send me a link to the project and I’ll check it out.

---

<div class="post-metadata">

### Author: ![codeswept](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/codeswept/32/87755_2.png) [@codeswept](https://community.thunkable.com/u/codeswept)
#### Post date: [June 16, 2021, 5:47am UTC](https://community.thunkable.com/t/dvl-layout-wrapper-unable-to-set-visibility-to-false/1347394/9 "2021-06-16T05:47:24Z")

</div>

I’m tyring something else too: displaying the visibility in label after setting it. Could you also give me a minute to save the screen in a new project, if you don’t mind? I have a _lot_ of data in the app.

---

<div class="post-metadata">

### Author: ![codeswept](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/codeswept/32/87755_2.png) [@codeswept](https://community.thunkable.com/u/codeswept)
#### Post date: [June 16, 2021, 5:50am UTC](https://community.thunkable.com/t/dvl-layout-wrapper-unable-to-set-visibility-to-false/1347394/10 "2021-06-16T05:50:25Z")

</div>

Weird. I’m unable to add a saved screen to my project. When I click the plus icon it directly adds a blank screen.

---

<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: [June 16, 2021, 5:58am UTC](https://community.thunkable.com/t/dvl-layout-wrapper-unable-to-set-visibility-to-false/1347394/11 "2021-06-16T05:58:13Z")

</div>

Are you using the snap-to-place or drag-and-drop interface?

---

<div class="post-metadata">

### Author: ![codeswept](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/codeswept/32/87755_2.png) [@codeswept](https://community.thunkable.com/u/codeswept)
#### Post date: [June 16, 2021, 5:58am UTC](https://community.thunkable.com/t/dvl-layout-wrapper-unable-to-set-visibility-to-false/1347394/12 "2021-06-16T05:58:25Z")

</div>

I’m using Snap-to-Place. I don’t use the DnD as of now.

---

<div class="post-metadata">

### Author: ![codeswept](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/codeswept/32/87755_2.png) [@codeswept](https://community.thunkable.com/u/codeswept)
#### Post date: [June 16, 2021, 6:02am UTC](https://community.thunkable.com/t/dvl-layout-wrapper-unable-to-set-visibility-to-false/1347394/13 "2021-06-16T06:02:00Z")

</div>

I know that it recognizes whether the data is equal to the society or not, because in the input, I get the names and society names as long as they are not equal to the actual variable ‘society’. Like, if my society = Society3, then I get

- Society1, Name1
- Society2, Name2
- Society4, Name4

It skips out on Society3 as that is the value of my 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: [June 16, 2021, 6:02am UTC](https://community.thunkable.com/t/dvl-layout-wrapper-unable-to-set-visibility-to-false/1347394/14 "2021-06-16T06:02:25Z")

</div>

You are initializing your two lists as empty text strings and then assigning lists to them. That should break your project. Please replace the `" "` blocks with the `empty list` block and try again.

---

<div class="post-metadata">

### Author: ![codeswept](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/codeswept/32/87755_2.png) [@codeswept](https://community.thunkable.com/u/codeswept)
#### Post date: [June 16, 2021, 6:03am UTC](https://community.thunkable.com/t/dvl-layout-wrapper-unable-to-set-visibility-to-false/1347394/15 "2021-06-16T06:03:28Z")

</div>

But doesn’t it anyway become a list? When I’m trying to insert stuff directly into my variable I initialize it as an empty list but I never knew that if you’re setting the whole thing to a list then in needs to be initialized the same way.

---

<div class="post-metadata">

### Author: ![codeswept](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/codeswept/32/87755_2.png) [@codeswept](https://community.thunkable.com/u/codeswept)
#### Post date: [June 16, 2021, 6:05am UTC](https://community.thunkable.com/t/dvl-layout-wrapper-unable-to-set-visibility-to-false/1347394/16 "2021-06-16T06:05:54Z")

</div>

Besides, in my original project, they are initialized to empty lists in my original project. Since I’d initialized them in a different screen, they didn’t get copied when I saved the screen.

---

<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: [June 16, 2021, 6:06am UTC](https://community.thunkable.com/t/dvl-layout-wrapper-unable-to-set-visibility-to-false/1347394/17 "2021-06-16T06:06:12Z")

</div>

This worked for me but you said it didn’t…?

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

---

<div class="post-metadata">

### Author: ![codeswept](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/codeswept/32/87755_2.png) [@codeswept](https://community.thunkable.com/u/codeswept)
#### Post date: [June 16, 2021, 6:07am UTC](https://community.thunkable.com/t/dvl-layout-wrapper-unable-to-set-visibility-to-false/1347394/18 "2021-06-16T06:07:35Z")

</div>

No it doesn’t.

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

---

<div class="post-metadata">

### Author: ![codeswept](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/codeswept/32/87755_2.png) [@codeswept](https://community.thunkable.com/u/codeswept)
#### Post date: [June 16, 2021, 6:10am UTC](https://community.thunkable.com/t/dvl-layout-wrapper-unable-to-set-visibility-to-false/1347394/19 "2021-06-16T06:10:37Z")

</div>

I still see the first entry, though I can’t see anything wrong with the code.

---

<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: [June 16, 2021, 6:13am UTC](https://community.thunkable.com/t/dvl-layout-wrapper-unable-to-set-visibility-to-false/1347394/20 "2021-06-16T06:13:13Z")

</div>

There’s something wrong with your variables. Start over with new list variables and initialize them as empty lists.

**Edit:** no, that may not be it.

[Next page](https://community.thunkable.com/t/dvl-layout-wrapper-unable-to-set-visibility-to-false/1347394.md?page=2)
