Tinydb - storing and getting value from a list

what this one has to do with my question ?

No sign of the “is in list” block ???

My question was regarding lists & tinydb. I just don’t understand what you’re trying to say.

where shall I put it ? if you dont mind can you show it with blocks ?

Like so:

image

1 Like

The main problem is when I add new values (via variables) to the list the previous values gets deleted. Like if the list previously had a value ‘1’ then if I add a new value ‘2’ then ‘1’ will get deleted or removed.

Add the new values to a list, then save the list to the tinydb with a tag

image

to retrieve the list and set to a variable:

image

1 Like

did you check my screenshots above ? this is what I did na ?

sharing them again:
loop Store

How is global TinyDB_List variable initialised?

Initialize

You need to set your global TinyDB_List variable to the list stored in TinyDB before adding items to list. Something like this :point_down:




Above is just an example. You have to set it according to your need

5 Likes

Not working. I tried it beofre, But it was placed below ‘call TinyDB1 store value’. Not working this time too.

For me its working exactly as it should work. Can you post a sample aia here illustrating the problem?

there are like 1700+ blocks :no_mouth:

I said :point_down:

It’s more like a level locking & unlocking system. May need most of the blocks to illustarte the problem…

Ok… I tried to help you as much as i could… I still firmly believe that above blocks, in my reply, are surely working for the specific problem mentioned/discussed here… I will not be able to help more than this. :slightly_smiling_face:

Yeah the above blocks should work
@mikkupoocha
@Vaibhav

@Vaibhav @Pradevel
I think it’s fixed now. I guess the problem was with the ‘for each’ block. I changed it to match Vaibhav’s code.


Thanks @Vaibhav :slight_smile:

It would be great if anyone could help me understand why the for each loop didnt work. :sweat_smile:

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.