Get row objects from block doesn't work

Hi,

I have the following block, but it does nothing, the Alert doesn’t shows up and if I have blocks after the Get row objects block, they run neither.

It is like it the get row object from block stops the whole code.

Any idea?


1 Like

Here is the test project: Thunkable

You’re assigning a row object to an alert block that takes text as an input. That sort of type mismatch is generally going to cause a crash.

What text are you wanting the alert title to show?

I want to work with a list of the elements in a row, but I am unable to get them, as it crashes. I have tried other ways as well, but the app still crashes (freezes), it needs to have an hard reset after this block.

I have tried this ways to display already, but haven’t succeed:


Update: I have a Google Sheet assigned to my project as well, and the blocks work that way:


I think there might be a problem with my data source. But why?

The problem is that the “get row object” block returns an object. An object is a collection of values, not a single value.

You can’t assign an object to a text block such as “Alert_Error’s Title”. It’s a little like you saying to me “What’s your name?” and I respond “here are 5 dictionary pages”.

Anyway, analogies aside, if you want the row data then you have to parse it using “get property of object” blocks. I don’t have a lot of experience parsing row objects but I believe there are tutorials and videos available on that subject.

Typically, you’d just use the “get value” blocks to get row data, as explained in this video:

But if you can explain what type of data you want to get from the row, I can help you further. What I’m asking is… what would you expect the Alert Title to display if this all worked correctly? What is the actual text it would show?

1 Like

Hi there,

I have experience with the blocks of the Object section and I can work with them.

The problem is that I don’t get the objects of the row, as the screen freezes. The alert shows up neither.

This problem only comes up with my Data Source:

But if I am using Google Sheets or another Data Source, I get the response I have been waited for:

Well, I think because of that there is a problem with my data source but I don’t know why. (I deleted the smileys and the app freezes that way as well)

Okay well you don’t seem to understand what I mean by type mismatch and “object” data types. Sorry I can’t explain it better right now. And you still haven’t said what the intended display would look like so I can’t help you get there either.

Maybe someone else will have some ideas…

Thank you for your help @tatiang,

I want to get a list of the items in the first row.

Thanks!

Okay. The Alert Title can only be a text string, not a list. So while you can get a list of values in the first row and then pick a single value, you can’t just make the Alert Title display a list.

The exception to what I just said is that you can use the “make text from list” block in the List drawer to convert from list to text.

But you said you’re familiar with working with objects so I would suggest that you first pull out one property from the row object (e.g. “Name”) and see if you can get that to work as an Alert Title. If you can, post an update and we can go from there.

I deleted my Data Source and created a new one instead of the old one and now, it does work as expected. This time I inserted the data manually. (I didn’t use Command+V)

Thank you for your help @tatiang !

1 Like

Glad you were able to fix it. I’ve had good success with ctrl-V, but I wonder if special characters bugged it!

1 Like