Spinner dependent dropdown list

My Project want to read only data from above but in drop down selection from dependent spinner by using Tiny DB. By using fallowing i can get to spinner 1 data then i have to save that selection to pass on to next screen and at the same time in other google sheet use =INDEX(FILTER(prolocation!D2:D,prolocation!D2:D<>""), COUNTA(FILTER(prolocation!D2:D,prolocation!D2:D<>""))) and get next cell to get rage of data by =unique(filter(productlocation!B2:B,productlocation!A2:A=D2)) to get next spinner get data...
Can it be possible from all spinners in screen and getting data in CSV format from google sheet to store in Tiny DB for next spinner to get dependent data.
I searched all types but ended with nothing in hand and if i can request block for such even up to level 3 means Spinner 3 to get dependent data will be really grateful.
all spinner screen i use fallowing but not Tiny B...

Why don't you use all spinners/elements items into different global variables and do some basic logics within app?

I am working on a demo project that uses gviz query to return dependent drop downs from google sheets, hope to get it finished today....

1 Like

Really grateful for same.

This demo project uses the gviz query language to retrieve data from a google sheet. There are no dependent drop downs on the google sheet, this is all handled by the app and the gviz queries. One assumes that the app user will not need to create stock items, so this is not included in the app. The spreadsheet owner can categorise their stock items from category lists on the spreadsheet. Only stock items will be used to generate the dependent drop downs on the app. To select an item or items using all four categories in my demo will therefore require 5 calls to the google sheet. (This is far too many for my liking, but given the desire to use a google sheet for this work....)

Stock Sheet

Category Listings


All Stock Items

Category Selected Item

Screenshot 2022-10-16 12.22.05

Working Demo App

ShopSelections (2).aia (25.6 KB)

open for questions :wink:

Credits @KevinKun for the Tableviewer extension, used to display the stock items


This is exactly what am expected for... am delighted to see same...

Just for to understand more

For gid if am create global variable do it will work for same? Am going to try for same. Yes.

If dependent drop down changed the cell value, then would it reflect in next in spinner as its will or will invalidate next all entries? As will not dependent dropdown then...

If you mean the gid for the worksheet, then saving it to a global variable will work just the same.

In fact, the actions in Web2 are not needed ( I made some significant changes and the call is no longer necessary - my original aia project and blocks image updated)

You will need to explain this, I do not understand...

(added to new gviz section of)

1 Like

Had tested this too so as expected.

This is too tested and perfect.

Please remember that this is a demo. In its current state it would not be useful in production, because with many many stock items things may start to slow down when loading the data / images. You should consider the RecyclerView extension for display, and cache first time images for reuse. In essence, there would be a lot more to do to create a workable app.

Again, you might want to consider using SQLite, download all the stock data to an SQLite database, and conduct the queries locally on the device/app....

Yes Agree. Am trying to push this block for the page only filter work for dependent data for today's date only.

One question- If I have to set text piece for textbox 3 for create/update with '@" and textbox 5 for create/update with numbers with no decimal then where to set that block with notifier & If then....

Yes. that's very much needed & taking same. Thanks for same.

Sorry, do not understand, show relevant blocks or diagram of what you want to do

like this.

this will control specific input in create/update for specific format like must have @ or must have number or must have piece of text "https://drive.google.com/file/d/"

Well, did you try it? Did it work ?

Usually, it is better to try things out, then ask a question if it doesn't work as expected....

that's exactly what I did. but I can't write code to go from spinner1 select to the exact global variable that becomes spinner2 elements. can you help me?

I realized that the example I wrote was not helpful in explaining my need. I try one last time.
I created a general variable that contains a list of about ten items: this general variable becomes "spinner 1 elements".
I then created another seven general variables, each of which contains as many lists, each with about ten items.
one of these seven general variables will become "spinner 2 elements" based on "spinner 1 selection"
Therefore, I need help to write the code that allows me to insert the correct general variable, one of the other seven, into "spinner 2 elements".

Here is a "simple" example of spinner dependent dropdowns. I strongly recommend that you use a spreadsheet or csv file to collate and maintain your lists, rather than trying to build them inside the app with list blocks.

spinnerDDExample.aia (3.8 KB)

1 Like