I have a dataviewer list.
Clicking on an item, I modify some values of a label in that Item.
Now I would like to scan every items to search if the label has a certain value and do something if so.
Unfortunatelly It’s not clear to me how to do it.
Are every single element of a dataviewer list rows?
This is what I’m doing but i get a single iteration for a 3 items list.
Are you saying that you’re changing the displayed value in the dataviewer list without changing the attached database? You probably shouldn’t do that. @codeswept’s blocks should work if the data is in the source table.
Can you show the blocks you’re using to apply the value to the item based on user interaction?
Recap:
I have a list of rows, In every row there is a Label taking it’s text from a DB and a flag to select some specific row, then I should take the selected rows to something.
The flag is not taken from DB but is applyied by user when clicking.
No sense to have it stored in the DB. I can do it, but it has no sense.
Clicking the button I would like to change the button background color and the text of the button.
In my past version I cloned row to have a list and all works, but it was slow to crate and fill rows from DB so I’m looking for a faster version and I’m trying with a custom dataviewer list.
BUT
With Dataviewer list It seems not possible to change button properties
This code Cause NO EFFECT
The same thing applied on a label works.
Here is a project with both label and button https://x.thunkable.com/copy/40bad032babd530db421e02fd5c2067a
So I decided to use a label instead of a button.
All this to explain why I change a value without touching the DB.
I would like to retrieve the flagged rows directly from the dataviewer but As you said, it seems that I can’t do it if I don’t store the flag value in the DB.
Is this the only way?
Just reselect the dataviewer element, maybe it’s due to a change of the position of the button si the Dataviewer seems different and it has to be relinked
The Button can not be part of the Data Viewer components. If you add it to the DVL it will not trigger the item click event when you click on it. This is why you do not see it functioning.
Similar problem even using a switch. It doesn’t trigger the item click event and it switch value of ALL switches at a time.
However, maybe it’s better to discuss it on teh specific topic
For now, it seems there is no way to scan items of a list out of a Data Source scanning and using a boolean object so I MUST insert the “boolean” value in the data source table and display it as a label.