Skip to main content
Question

Ranking On Reports

  • June 24, 2015
  • 0 replies
  • 160 views

Forum|alt.badge.img+4
Not the first time I have asked this question... but really doesn't make sense to me why Quickbase wouldn't have the ability to show line numbers (ranking) on reports (and column identifications for that matter) similar to a spreadsheet.  After all it does count the number of records in any given report and reports it at the top of the report.

We run a golf course and use Quickbase as an on-line database to score events, and to be able to auto number rows, would allow us to show player rankings in an event ....

See attached graphic for example.


This topic has been closed for replies.

The solution is to build this report using a Summary Report instead of a Table Report.  Include a field which is called Ranking, which is a formula field of a formula of 1, and show it as a running total down the report.

Forum|alt.badge.img+4
  • Author
  • Quickbase Alumni
  • June 24, 2015
That I don't understand Mark.  In a summary report, can I show multiple fields of the same record?  Example, I have the players name, their score for each hole (18 fields) possibly their front 9, back 9 totals and gross score? and then sort based on their gross score and individual hole scores (to break ties via retrogression)?

  • Quickbase Alumni
  • June 24, 2015
Yes you can do this with script:

Counting Daisy Petals
https://haversineconsulting.quickbase.com/db/bj2vba44z

The default report shows the image onload field [Index] as empty:

Default Report
https://haversineconsulting.quickbase.com/db/bj2vba46e?a=td

But on the List All report the image onload field [Index] is dynamically filled in:

List All
https://haversineconsulting.quickbase.com/db/bj2vba46e?a=q&qid=1

Normally the image onload field is named [-] but since we only want it to show up on reports it is used as the column header we named it [Index].

Pastie Database
https://haversineconsulting.quickbase.com/db/bgcwm2m4g?a=dr&rid=393


Notes:

(1) this is a very green solution as we recycle the space taken up by the image onload field to display actual index data:

[iol] & "module.js" & [/iol]
&
"<span class="QBU_Count"></span>

(2) Note that Index is not saved in the table as it will change depending on which report is displayed. Compare the List All report to this one focusing on the delta and epsilon records:

Contains Letter "l"
https://haversineconsulting.quickbase.com/db/bj2vba46e?a=q&qid=5

I will look back on my emails with you.  At the time I did believe it was possible to do.

Forum|alt.badge.img+4
  • Author
  • Quickbase Alumni
  • June 24, 2015
Way way way, above my expertise.


  • Quickbase Alumni
  • June 24, 2015
Nonsense. I will do it for you if you want and it will take 10 minutes.

Forum|alt.badge.img+4
  • Author
  • Quickbase Alumni
  • June 24, 2015
Your notes on me must be extensive Mark....  I actually did query who I thought was a Quickbase staff a while back about the same issue, because I wanted to know why in a report, you couldn't build a counter as a calculated field (for goodness sake, it was one of the first thing we did as kids learning to program in basic) and she agreed it would be a great feature, but could not be done as a calculated field.

  • Quickbase Alumni
  • June 24, 2015
It can only be done with script and script can do everything!

Forum|alt.badge.img+4
  • Author
  • Quickbase Alumni
  • June 24, 2015
Yup, same issue I am trying to solve, and find it funny that you still have that particular issue noted (and yes, I am still angry at the world).  I re-read your thought about devising fields to manage "hole to date scores" to sort and I guess you thought was this would create a ranking within the table? versus just letting the report break ties, sort and report?  But even if we did devise the hole to date scenario, how do we create a dynamic ranking?  Plus it would rank all records in the field against one another, when a event may have several divisions, each requiring its own ranked report?  (You must get tired of me ... )

Forum|alt.badge.img+4
  • Author
  • Quickbase Alumni
  • June 24, 2015
I would love to send you the table.

I recall that I thought this through once and though I could get what you wanted, natively.

Forum|alt.badge.img+4
  • Author
  • Quickbase Alumni
  • July 27, 2015
Okay, I give up, could I beg your assist on writing the script? I tried to write on as a calculated column on a report, but I either get a syntax error, or a "1" on every record. Thanks in advance.

Forum|alt.badge.img+4
  • Author
  • Quickbase Alumni
  • July 27, 2015
& yes, the Pastie Database example is exactly what I am looking for.  So I tried to create an index field, (formula - numeric), but when I fill it with your script example I get a syntax error?

I'm still wanting to prove that this can be done natively if you give me access to your app or a copy of the app. No charge. It's s brain teaser.

  • Quickbase Alumni
  • July 27, 2015
>  prove that this can be done natively

Mark I wanted to help you out on your native quest to solve this problem. I mean there has to be a native solution since the QuickBase formula language is Turing Complete. To the extent you may need to check your formulas for correct syntax I wanted to share this online Turing Machine Simulator that may speed up your efforts. Here is a shared link for a Turing Machine Simulator that will check for balanced parentheses in this simple example formula:

LastDayOfYear(Todate("August 4, 2009"))

Turing Machine Simulator
http://morphett.info/turing/turing.html?949cc8652811af0a84d8

Just go to the above link and click the Run command.

Enjoy ...
On computable numbers, with an application to the Entscheidungsproblem by Alan Turing http://www.cs.virginia.edu/~robins/Turing_Paper_1936.pdf

Breaking the Code: Biography of Alan Turing
https://www.youtube.com/watch?v=S23yie-779k

  • Quickbase Alumni
  • July 27, 2015
You have to provide more info for me to debug this. Share an application if you want but make the application as simple as possible and no more.

Forum|alt.badge.img+7
  • Quickbase Alumni
  • January 30, 2019
How did this go, out of curiosity?