Hello everybody and thanks by advance.
I’m trying to change the color of my data view’s list, when the date of the day is equal to the date of an event (from this data view list). I put an alert to see if my code is ok and this the case. So i don’t understand why the color of the item in the list does not change of color. Here is a screenshot of the code. Thanks again
Ben from France
The find first occurrence of item
block returns an integer representing the item number of the list where the matching value was found. But you’re using that value in app variable rowid-reunion
as a row id. It isn’t one. So you need to get the row id from the database (list of values... in ID
) and use that instead.
Suer many thanks.
So now i don’t understand why when i use this same variable to get more details about this item, it’s working .
The app variable rowid-reunion can be set from the picked item of the data view list or if the date of the day is the same of the from an occurence.
In my datasheet i have done tests and the data viewer’s ID is the same value as the one which i retruned by the first occurence founded.
I hope i’m clear my english need to be improved
Check this. I created it to show how you can change the colour of the row when selecting it.
https://x.thunkable.com/projectPage/5fe49968180d0200197113a3
@martinet
Just to give you explanation on the point you got confused (row ID).
When you connect to a table (Local Table, Airtable or Google sheet) using the Data Sources
option, Thunkable will allow you to refer to rows in these table in two ways:
- Using the table’s internal row ID which is a unique 32 character long alphanumeric code.
- the serial number of the row in the table.
In this case the get value from
block will get data whether you supply the serial number (1,2,3,…) or the hidden unique row ID.
However, when using DVL (Data Viewer List) or DVG (Data Viewer Grid) then only the unique row ID is used. To refer to any row in a DVL/DVG you will need to use the unique row ID and not the serial number of rows.
When you use any of the blocks of DVL/DVG you will see that the green block row id
refers to the unique row ID which you can use to retrieve data from the table.
Hope this makes it clearer on why you can get information from the table but not from the DVL/DVG.
Hello and thanks for this template. I understand everything excepted “if not platform is web” with a refresh for the list.
Thanks again; It’s clear so i have to get the internal row ID from the occurence founded by the “in list block”. But i don’t know how to do that
I will try tomorow and let you know Thanks again for your help
Ben
From experience, I found that when testing the change of color in the web live test or web preview
it works ok but when testing it in the mobile live app
the change of color doesn’t work as expected so the solution is to refresh the DVL
this is why I test if the app is running from the mobile I refresh otherwise no need.
Let me know where you get stuck and give a screenshot of what you are trying to do and I will see how to assist.