DVL Layout Wrapper unable to set visibility to false

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.

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.


This works for me:

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.

1 Like

Thanks! Let me try that

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

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?

1 Like

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.

1 Like

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.

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.

1 Like

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.

1 Like

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

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

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

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.

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.

1 Like

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.

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.

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

1 Like

No it doesn’t.

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

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.

1 Like