I want a new block for variable where we can set the name instead of selecting from a drop-down, like any component block, for example for any label block we need to attach a label component block similarly I need any variable block where we can attach a string name for the variable
Do you mean the function in Thunkable X?
No not even a string a seperate space for name like we have in any component for component parameter
Can explain more?
Im making a timetable app and for each day i have seperate variable like for each day i have subject, time, and date and i want to add item depending on which variable i have selected
I have used this method by setting the text paramter of procedure to calculate which variable i have to select to add item
As you can see for each day i have added the name in the text paramter of the procedure and depending on my logic it will select the variable in which i want to add item. But if i do the same thing with list like if i directly input the list to which i want to add in procedure text paramater, it won’t take the name but instead it will take the values in the list , so if we could set the name of variable externally then it would help
In your case, it is possible with simple logic (dictionary, list of pairs etc.)
And I don’t see any needs of changing the name or getting the name of variable.
Thanks for the suggestion but I don’t know how to use dictionary in kodular and it would be an easy method for variables if this is implemented
learn to work with dictionaries or lists of lists and the lookup in pair block
and use procedures for example to get the subject depending on the weekday or to get the start time depending on the weekday
- How to work with Lists by Saj
- How to work with Lists and Lists of lists (pdf) by appinventor.org
- How does the lookup in pairs block work?
in the first image, when i use the logic does it take the values of list or does it take the list name?
Using Dictionary will simplify a lot of this repeated
if then else block.
Have a look at this explanation of dictionary.
This guide helped me a lot.
This can be done with dictionary… Play with it… I understand your point, since we have same project right now, and dictionary do save lot of work…
Maybe walkthrough my guide as well
Thanks but i already have found the solution to my problem for now but also it would be easier if a seperate section for name in variable is introduced