I need to create a cumulative column that has a running total.

  • 0
  • 1
  • Question
  • Updated 2 years ago
  • In Progress
I'm trying to create a cash flow chart and I need to create a cumulative column that has a running total. Something like a summary report but I need to create a chart/graph off of it.
Photo of Logan Lott

Logan Lott

  • 70 Points

Posted 2 years ago

  • 0
  • 1
Photo of Ⲇanom the ultimate (Dan Diebolt)

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 26,262 Points 20k badge 2x thumb
My advise is to use script and one of the following strategies:

  1. use script to (a) purge a secondary table, (b) fill the secondary table up with your cumulative data, and (c) generate the chart off the secondary table
  2. user script to build your chart using the QuickBase and HighCHart APIs
  3. use script to modify a non-cumulative chart to be cumulative. See: https://haversineconsulting.quickbase.com/db/bk89redf6?a=td and press green button
(Edited)
Photo of Joel Paglione

Joel Paglione

  • 70 Points
Dan, I cannot understand how to use your script you pasted below. How can I use it?
Photo of Ⲇanom the ultimate (Dan Diebolt)

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 26,242 Points 20k badge 2x thumb
I didn't supply any script in  this answer. If you are referring to the script used in this application I can explain:

https://haversineconsulting.quickbase.com/db/bk89redf6

QuickBase does not make convenient to run script although script will solve all your problems that you can't accomplish naively.  For example, it takes a little bit of hackery to get a script to run from your application dashboard without loading a new page.  It is easy to come up with a script that solves some question asked in this forum but there is often a further back and forth questions and answer thread needed to figure out how a user wants to invoke the script and in what context. Common issues are (1) how a user navigates into the page that contains the script, (2) what type of page they are on when the script runs, (3) what triggers the script to run, and (4) what happens after the script completes. To moot all these issues I have taken to launching script from a Tasks table that has three fields:
  1. [Script] A text field that holds the name of a code page with extension "js" example: CumulativeChart.js
  2. [Description] A Multiline text field that contains a narrative description of what the script does
  3. [Button] A Formula Text field styled as a Vibrant Primary button which runs the script WITHOUT loading a new page
Once the task table is setup you can add a new script by filling in the [Script] and [Description] fields and start editing the code page identified in the [Script] field. In the course of your project you might have dozens of script that can be launched from such a task table. From the perspective on answering questions in the forum I can supply a quick solution to demonstrate that there is an answer and if the user wants to invoke the script from a location perhaps closer to the primary table it operates on or in a particular form that can be addressed as a separate issue.

The definition of the formula text Button field is in this Pastie:

Pastie Database
https://haversineconsulting.quickbase.com/db/bgcwm2m4g?a=dr&rid=553
(Edited)
Photo of Joel Paglione

Joel Paglione

  • 70 Points

Dan, can you explain in simpler terms or give me a call. I have left you a voicemail.

Photo of Ⲇanom the ultimate (Dan Diebolt)

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 26,242 Points 20k badge 2x thumb
will call tomorrow - all tied up today