I need to create (declare) 100 and more variables in my app.
Every time creating and maintaining this much or more blocks is a hectic job.
Is there any easy way or solution to this? So that I can use a comma-separated string or something else to create multiple variables at a time.
@TheGenius, use the LIST for this purpose.
First, create an empty list.
Then add 100(or more) elements to that list using a for loop.
This works like an array of variables.
But the method name or block name says it all. You can ask about the blocks that you do not understand in the community. And everyone learns by doing. And by doing it I mean, not always doing it right but making mistakes sometimes. For a beginner its bedt to learn new things but trying it out. If get stuck just search the community. Most probably you’ll find what you need. If not, just ask!!
to use Dynamic Variables I need to create two separate lists.
That means this extension, itself is dependent on lists.
I can simply store the same data to a single list.
So what is the advantage of this extension over a list?
And as per my understanding, there is no block to store the data to a particular variable.
We need to change the data of a list and then the dynamic variable block can fetch this data.
It is dynamically created variable. Thats the only advantage. For your problem this is not solution, but just an idea which might help you. Not a solution
Instead of creating 100s of variables you can create a dictionary. Using dictionary will be much better because you shouldn’t have to initalize it with the different type of the variables(strings,numbers,lists etc.). So you can set any key’s value with any type of variable.
Calling the variable is also simple. You can get the value for any key using the simple dictionary get method.