I am having issues wrapping my mind around how to do this.
Say I have a thing… called Cases
A user creates new a case, there is a field called Case Status which has two options - open or closed.
I need to show on a dashboard the average number of days to closure for the cases…
But #1 I am not sure where/how to store the date/time when the case status field changed to close
and #2 I don’t know how I can show on the dashboard page, what that average days to case close is (among all of the case statuses)
Thanks Nocodify!
Question - is there a way that when the user selects the open or closed option in the case status field it would write the date to the case open date or the case closed date field (based upon which was selected) at the time the form is submitted? I don’t want the user to have to put the date in manually.
Thank you so much, I was able to make a field with the days to closure for each of the cases using only-when called Cases Days Open.
Now I am trying to figure out how to average them all (Cases Days Open) and show them as the average amount of (days) to closure on a dashboard page… using just the average number as representative. I think I can use dynamic text, but no idea of the formula…
Use the built in field for ‘created date’ to let Bubble track the Case Created Date when the User creates the case in the application.
Use the backend workflow database triggers to setup an automatic workflow when the case status changes to ‘closed’…in that workflow calculate the number of days from the creation date to the status ‘closed’ date and save it to a data field that is a number.
Then you can more easily see and calculate an average number of days for all cases by that User. Search Cases constrained by created by = current user…then from the search results you can use the :sum operator and the ‘/’ using the search results.
Be sure to checkout the Stripe Integration Course when you are ready to integrate Stripe payments to start monetizing your application via product sales or subscriptions.