Apologies if this has been answered before, but I couldn’t find anything with the search.
I’m encountering a strange behaviour in my app. It took me a while to figure out what is actually happening, and it was driving me crazy!
For context, my application captures progress of activities. One row per activity with a whole bunch of columns to define what the activity is, target dates, achieved milestones, etc, etc… I am using Quickchart.io to generate a stacked bar chart, showing the status of activities by target date (I don’t think this is achievable with the built in AppSheet chart builder?);
For this I only need to generate the column labels and values for each series. That’s all fine!
On top of this I’m allowing users to filter the data they want visualised in the chart, based on a number of the columns in the dataset. I’ve created a separate table to capture user’s filter selections (one row per user) and I have a slice (per series - G1, G2…) that is applying these to the main data set. That’s also all fine!
I’m then using a (probably pretty messy, inefficient) app formula to count the number of entries of each slice per year-quarter to get a string to feed to quickcharts (e.g the below formula returns “1,6,1,12,1,” as shown in the above chart);
What is infuriating me is that when I am calculating the chart inputs they always seem to lag behind the selections that have been made in the filters. When first loading the app, with no filters selected, the chart displays as expected. Then, when setting a filter value the chart values don’t update. When setting another filter value the values then update - to show the chart that should have shown previously!
So, that app formula for the chart URL appears to be calculating on row edit but for the previous values, not the ones that have triggered the update?
For now I’ve implemented a Yes/No field in the filter table. This gives me a toggle that can force the chart to update, but that’s obviously not an ideal solution!
Am I missing something obvious here? Or am I going about this in fundamentally the wrong way. Very much still learning my way around AppSheet, so greatly appreciate any support from the community.