Changing local db depending on which button I press

Hello I would like to know how to change the local db for my questions when I press a button.
E,g if I was to press section A, local db set A would load and if I was to press section C, local db set C would load.

This is without creating x numbers of pages just to use for different local db as that would be inefficient.

Please help.

As I see it, you have three options:

  1. Keep everything in a single data source. If the number of rows for each category is static (doesn’t change), this should be fine. Just use the row #s as ranges for your blocks. So if “Seasons” data is in rows 45-60, just pull from those rows when you need that data.

#1 would be my approach

  1. Convert each data source to a list of lists when needed and then use that same variable (list of lists) throughout your functions.

  2. Store your data in Firebase (online or offline). Since Firebase doesn’t have traditional “rows”, you can organize the data however you like, for multiple categories.

2 Likes