I am making an app to plot a child’s height, weight, etc. based on a number of reference growth charts (about 30 in total). For each chart, I have a table in a local data source. I’m trying to avoid AirTables and Google Sheets to keep things simple, which is probably my problem here. Each table has like 20 rows and 8 columns, and I need all the data from the table for each kid, since I’m recreating the entire growth chart with 7 percentile curves and then plotting the kid’s measurements on top of that (see image, hope that makes this understandable).
What I would like to do is have the user specify which reference they want to use (based on sex, age range, height or weight, etc.), store that as an app variable ChartDesired, and then using that variable to specify which table to get to plot that chart.
The problem with the Local Data Source blocks is that the Table Name and Column Names are hard-wired (which makes them super-handy when you are using only a few tables). Because of that, you cannot e.g. do a loop to get the results for Column 1, then 2, etc. Only the rows can be specified with a variable.
I can transpose the data to make columns into rows, but that doesn’t solve the problem perfectly. Of course I can make a huge If/Then block for all the ChartDesired variables and read each row in that table to a list, but that is going to mean like 25 blocks per chart,
Or I guess I could put all the data for 30 charts into one table, but that still isn’t perfect.
So maybe this is a feature request to make Local Data Source blocks where the Table Name and Column Names can be specified with a variable?
Anyone have a solution that’s more sensible? Thanks!