@knkiranjoshi no need to connect firebade with Google sheet… The moment you store the value in firebase, same time you store the user details in googlesheet
Bucket : 24-02-2021 (date)
Tag : 0000000000(mobile)
So Every time i click on [Order History] instead of showing all orders it only shows one order!
So to solve this problem i came up with idea of adding +1 behind the Mobile Number
Ex. Bucket: 24-02-2021/000000000
Tag : 0000000000+1
It works when i manually enter it!
So the problem is I’m unable to do it automatically
I mean, when user order first time it should store data as tag 0000000001 and same user order for second time it should Store data as tag 0000000001+1= 0000000002
I have tried with initialize global but don’t know how to do it!
If he order first time , count the order and store in the firebase as a “Order1:Mobile”, second time order mean tell firebase to store “Order2:Watch” like that…
First order save it as a tag 00001 in fb and tinyDB
Second time while he order call tinyDB to read the existing tag, if it finds then upon ordering save it as tag 00002(use maths block in tag to sum it. likewise set up rule
it goes like this, worked well
i have uploaded the blocks just to confirm that what i have done is correct or not,
P.S. still working on how to store tinyDB data to Firebase when screen initialize.
very simple @knkiranjoshi , When the screen initialize call the tag (phone number as a list) from the firebase also get it lenght using the block length of the list and retrieve the last tag(that is the length. Ie. While retrieve if it says length 7 mean retrieve the 7th list value using the block Select list item list Index7 and store that value in tinyTB.
All will take place matter of seconds… So when user confirms the order it will be easy for you to store the his nth item in the firebase also in app.