Sort by Color Coding

  • 0
  • 1
  • Question
  • Updated 4 months ago
  • In Progress
I have an embedded report which is set up where if key fields are empty, they will have a red background... I then have JS code which will pop up an alert if red background is present on the page... this works great...

What I'm being asked by users is if there's a way to have these red background rows automatically at the top of the report.

From what I can see, QB doesn't have a "Filter/Sort by color" function, like in MS Excel... 

Any help would be greatly appreciated, and thanks in advance.
Photo of Ryan Stanford

Ryan Stanford

  • 1,992 Points 1k badge 2x thumb

Posted 4 months ago

  • 0
  • 1
Is there anything special about the embedded report beyond your JS code to alert them? Assuming you're just using a standard report link / embedded report - you should be able to sort the report by your key field in order such that those missing will appear on top. 

Chayce Duncan | Technical Lead
(720) 739-1406 | chayceduncan@quandarycg.com
Quandary Knowledge Base
Photo of Ryan Stanford

Ryan Stanford

  • 1,992 Points 1k badge 2x thumb
That would work, except that the color coding searches for more than one column... So I can't just set the default sort to that column.
My recommendation would be to make a new formula that mimics the logic in your color coding - and then use that as the sort for your report. So if your report has 3 colors lets say - make this formula field calculate 1, 2, 3 etc, and sort by that.

Chayce Duncan | Technical Lead
(720) 739-1406 | chayceduncan@quandarycg.com
Quandary Knowledge Base
Photo of Ryan Stanford

Ryan Stanford

  • 1,992 Points 1k badge 2x thumb
I'll give that a shot... sort of a round about way of doing it... but if it works... then it works.