In an Aggregate how do I could the number of times a box is checked?

  • 1
  • Question
  • Updated 4 years ago
I have a record which contains a checkbox. When aggregating the object type I would like to count the number of times that box appears checked.

I tried using a SUM and a COUNT and it appears the checkbox field is not supported in those capacities in SKUID. As a work around I decided to create a Formula Field (Number) that would be either 0 or 1 depending on if the value of the box was checked. Unfortunately it appears that SKUID aggregates do not support formulas.

Aside from using APEX or field updates to populate a Number field is there a better way that I am not identifying to count fields which are checked in Aggregates?
Photo of Joseph Ucuzoglu

Joseph Ucuzoglu

  • 1,074 Points 1k badge 2x thumb

Posted 4 years ago

  • 1
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,764 Points 20k badge 2x thumb
Create a basic model on the object in question. Filter by the checkbox field.

{{$Model.YOURMODELNAME.length}}
Photo of Joseph Ucuzoglu

Joseph Ucuzoglu

  • 1,074 Points 1k badge 2x thumb
Hi Pat, thank you for the response.

The Aggregate object provides several fields on the same row.

Am I able to mix/match items from Basic Objects and Aggregate objects on the same row of a table (which would be ideal)?
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,026 Points 20k badge 2x thumb
Joseph - you can do this with an aggregate model. 

You should make the aggregation a count on record ID.  Then in the conditions only include records where the checkbox field is true. 
Photo of Joseph Ucuzoglu

Joseph Ucuzoglu

  • 1,074 Points 1k badge 2x thumb
Hi Rob, great solution! With SKUID allowing so much to be dynamic I can accomplish the same objective in additional ways for example the solution you mentioned which I will put into place. Thank You
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,026 Points 20k badge 2x thumb
Thanks for the compliments. Glad it worked for you.