I looked here for some topic for my problem, but I didn’t find it.
I’m using the “list of values in” block to get the IDs of the Google sheet rows. When checking the list through a “for”, he cannot bring these IDs (it’s as if the ID did not exist). But any other column they bring the values. Could you help me with this?
I had seen this thread suggested by you but I couldn’t solve my problem yet.
A print of the block follows.
This worked fine when I tested data that I entered directly into the cell. But I needed to make a change in the worksheet so that the columns are being “populated” with data from another page of the worksheet through the ARRAYFORMULA (=ARRAYFORMULA(Answers!B2:F)) function. After I made this change the IDs are no longer being captured. It’s like I lost the worksheet reference. But if I manually enter the IDs are found by the “list of values in” block.
PS.: I already deleted the project’s base in Thunkable and redid the whole process as if it were a new base instead of just doing a synchronization. yet it still doesn’t work.
I tried to apply your suggestions, but none worked.
I pointed the list of IDs to another page in the worksheet and added some values manually, without using the ARRAYFORMULA function (without copying the data from another page). And it worked!
It implies that the problem is in the worksheet and not in the app. But I don’t know how to solve this problem yet… it’s like the line created through the ARRAYFORMULA function doesn’t generate an ID, I think.
Do you have a column titled “ID”? If so, that’s the problem. If not, then you should see the list of values in a List Viewer / Simple List. Can you post a screenshot of the blocks you used to check that?
No, it doesn’t have an ID column created by me. The “column” ID only appears as an available option when I’m going to do a list query using the “list of values in” block (print 1). In the “get value from” block, no ID appears, only the columns I created.
Through a List Viewer, as the parameters are defined in the list settings, I can list whatever I want, because I already inform the column. But in the simple list, which I need to create a loop to go through the list and capture the data through the ID, it doesn’t work. A print of the blocks follows (2).
You must create your ID column
Note: Update Thunkable live app. If there is an update and you use the old one then you face some bugs and issues that actually do not exist. Just CHECK if there is any UPDATE in Google Store.
The ID that is generated by Thunkable is not a number but a long text of characters that’s why if someone wants to sort his rows according to the that ID then he cannot. He should create an ID (A number) for each row.
Please correct me if I am wrong.
Hello! Thanks for replying and sorry for my delay.
Well, I ended up redoing part of the project. Instead of using the automatic ID, I decided to use a unique value that I was already seeing in the spreadsheet. So, instead of using the block to read the list with ID, now I read the list with the other value.
I took advantage and identified a serious problem of loss of performance when reading data from the worksheet. With few records I have a relatively quick response. When it reaches a large number of records (I already have more than 500), it becomes impractical to use the direct search in the spreadsheet. So I made a change by creating a temporary local database and also switched to using Firebase for other things.
I couldn’t solve the ID problem I reported at the beginning, but I solved my problem by changing the search strategy.
Thanks a lot for helping!