For each item 'j'

Hi @thunkers!

Have any of you been facing trouble with this block lately?

This block is just not executing. I have narrowed it down to this because I set the text of a label after every function stating the (function name) has been executed. The label’s text never gets set to FOR EACH ITEM DONE. That clearly points out the block at fault, because all the blocks before it, yes, all the 2 blocks are getting executed! @domhnallohanlon any idea what is happening? I really need to know because I’m using a lot of the for each item block in my apps, and nothing will get executed without it.
P.S: My favorite debugging trick is to set the text of a label after every function. Could you please use the for each item block and try the same thing, and tell me the output here?

1 Like

by the way this is a loop
i have no problems in thunkable with controls
it is fine

1 Like

ya it works fine to me

@codeswept Can you post a screenshot of your blocks? That block can be a little challenging because the variable “j” can contain various types of values (string, integer, list, etc.) and if you aren’t handling it as the right type, you’ll get an error/crash.


Is it disabled by any chance?

1 Like

If you mean the entire block, no, it’s not disabled. Here’s a simple demo:


Thanks! I do understand its functionality. But I have a feeling even yours has a glitch. It’s setting the label text to"
1 and 2 have repeated. I live-tested the same app 2-3 times with the same output.

That’s a post in another topic of mine. The screenshots contain thee blocks which are crashing in my case.

Interesting. For me, it displays 1 through 10 in order with no repeats and no mistakes. It’s that way on Chrome on a Mac and on my iPhone in Thunkable Live.

1 Like

This is what I get:

This is on a Windows computer.

1 Like

it is getting it from airtable thats why it is refreshing and starting again

No, @tatiang’s project does not have Airtable, that’s a different project I made.

maybe show the block of tatiang’s project

it’s not problem with the loop it’s problem with screen opens
see this first let it complete till ten and then click button see what happens