Has anyone used this block successfully? I presume it’s the right block to use if I want to replace an item in a list. It’s not working for me. Please help.
Hi @Patrick_Elisha - couple of questions here, firstly:
If you’re storing your list in a cloud variable, does it still look like a list when you retrieve it? Are you using any blocks to parse this data?
Hi @Patrick_Elisha, it looks as if you are storing a list of lists? Is that correct?
The variable j needs to be a list if you’re going to assign something to it using an “in list” block. So @domhnallohanlon’s question is key here: what does j look like by itself? Is it a list? Can you view it using a List Viewer?
Yes. The task is to replace the sublist item as in pic above.
I have no problem performing other tasks with list but set seems to be an impossibility.
can you try storing them as objects?
How? Can you show me in blocks with reference to my case?
can you describe a little more about what you are trying to do/
If i store as object as shown, how do i get values?
I was trying to replace(update) lat & lon in the sublist.
I’m going to go out on a limb here and say that you can’t use a for loop variable – j – this way. Although j is a list, I don’t think Thunkable can reference it the way you’re trying… by setting an item’s value when the list j is an item of the list subscriptions.