Thankyou for sharing knowledge.
[mod edit: with reference to this topic:]
https://community.appinventor.mit.edu/t/looking-to-convert-multiple-blocks-into-one/128092/15
I am also trying to create something similar. ie,
- Getting user inputs like product name, price, size etc.
- Storing/Updating it in Tiny DB.
- Converting it into .csv format.
- Share the file via email or Whatsapp.
Tub means what? Is it some container to store tools?
Is that Tub/container has many doors/arrays? How many Tub you use to store tools? how many array it has to store tools?
Have you grasped the tubs.aia file that is shared by @TIMAI2 ?
-
I saw, the 'Select Tub' option of the app has a list of numbers from 1 to 200 but two times repetitively. My question is that 'Is that numbers are listed so you can identify the tub?' And, my another question is that 'Why the list of numbers are repeated two times?
-
When we store the inputs like category, tools etc. why it is stored with new different ID's. What is the purpose behind it?
-
When I tried to store data over and over again on the same Tub number, the data is stored successfully but with new ID's. So, what can we understand from this behavior of the app about storing multiple data on the same Tub value. Is it about storing new tools on the same tub?
I moved your three posts from the other topic as it would only serve to confuse and have the same conversation going on in two places.
I almost wish I hadn't shown you that other topic, it seems it has only confused you further. It was just meant as an example of how to use a flat file database (AI2 List) with tinydb.
What is a flat file database ?
Here is an example:
Like in a spreadsheet
All the data for one id is stored in the same row
In an AI2 list, it would look like this (a list of lists)
[[1,"Mariane Akast","632 754 5878"],[2,"Maia Ander","367 894 3706"],[3,"Shaw Aspy","174 856 9895"]]
or
You can then store this list to tinydb:
and return the database and set it to your variable, when needed:
In your app, you work with the list, and if any changes are made then you store the list to the tinydb for persistence.
In your case, for each record, you would have the following columns:
productID, productName, productPrice, videoURL,Image1,Image2
You can choose whether to store the column names in the list, or have them as a separate list to add for display purposes.
I wish to grasp tubs.aia as well. So, I am going to ask lot of newbie doubts.
Il ask all the newbie doubts in next comment.
Why did you name the global variables as 'Vas' , tubFilterList, tubSelector, tubNumber, tubMasterList, currentID, yamlListViewMasterList ?? I wish to know the intuition/purpose behind these names. (I know that we can give any name for variable, but I wish to know that why did you specifically gave these names, what is the programatic-intuition behind these names)
=========================================================
DOUBT 2:
After observing these blocks for sometime I can understand/guess that you made these blocks for few reasons. 1) Procedure is created so, whenever it is called the specific vertical arrangement will be hidden. 2) We need to hide these vertical arrangements at three user actions. a) When Add Tool button is clicked b) When 'Show Tools' Button is clicked. c) writing ... ACTUALLY I AM CONFUSED HHERE, SO CAN YOU GIVE LITTLE CLARITY ABOUT THE PURPOSE AND FUNCTION OF THESE BLOCKS ...
vas
or VAs
is short for vertical arrangements
The other variable names are used to give an idea of what the variable is for. I usually include the word List if referring to a list, but I did not do this in all cases for this example.
Doubt 2
The use of the hideVas procedure is simply that, to hide all vertical arrangements, then display the vertical arrangement you want to see.
Thankyou very much. I can understand. May i know why did you use the word 'yamlListViewMasterList'? Is there any reason for using this word?
DURING SCREEN INITIALIZATION:
While seeing these blocks, I can guess that 1) variable global tubMasterList will store userinput variables in tinyDb because of the reason that 'create empty list' block is attached. 2) But, when I see the next block below, for the variable global currentID, '0' is attached to the tinyDB. Can you explain the difference of using 'create empty list' vs '0'.
-
Can you explain this block about variable 'global yamlListViewMasterList' and blocks connected to it.
-
Why 'call .setTubselector'? What is the purpose of it?
-
Can you explain the last block of this image as well. How it works?
In the mean time, let me observe the other blocks. Thankyou.
If I can grasp all the blocks of this tubs.aia file, then I can easily create my desired app. So, your guidence is very much helpful.
If you work through the blocks step by step, it should all be clear what each function is about.
I wish to learn instantly. So, I expect your explanation directly from your standard. So, I can learn in a short time. I will use ChatGPT as well for more help.
Thankyou for sharing this much detailed knowledge. Can you please, share me bit more. Only few more blocks left.
Sorry, I do not have the time for a detailed forensic examination of obvious blocks, for a project that I have mostly forgotten about, and that, from what I do remember, is not really applicable for your requirements.
Okay, Thankyou for your knowledge so far. I will try in alternative ways as well.
I am Planning to create a Fresh Project.
-
Use List of Lists Technique to get user inputs (Product name, price, size, image etc.)
-
Use Base64 extension for using image in the app (I have only 50% knowledge to do it).
-
Use Tiny DB to store & Display User Inputs.
-
Convert the User Input into .csv format.
-
Make the .csv format details as sharable to email, whatsapp, excel etc.
& Finally,
- I wish to include a feature that helps to recieve the .csv data and image files from other apps.
I am going to try this from now onwards.
I almost grasped the tubs.aia, this is really innovative way of arranging blocks. Most of the idea you applied is necessary for my app. Thankyou for sharing the right knowledge.