Skip to main content
Nintex Community Menu Bar
Question

can you display aggregations in a template?


Forum|alt.badge.img+7

I feel like I’m missing something obvious here…can you display an aggregation in a template field?  It works just fine if I place the aggregate field in the Field Editor but I can’t get it to display in a template.  

Any help would be greatly appreciated!

Did this topic help you find an answer to your question?
This topic has been closed for comments

8 replies

Forum|alt.badge.img+7

If you use it in a field editor you get the model context automatically. If you have a template outside of a field editior I think you need to specfify the model context fully. For example if you have a model aggModel with a summary aliased sumAmount,

In the field editor you could use {{sumAmount}} in a template
Outside of the field editor you could use {{$Model.aggModel.data.0.sumAmount}}





Forum|alt.badge.img+13

Just a slight clarification to Peter’s post: you need to use an Aggregation / Grouping field’s Alias Name in the template, for instance if your aggregation is SUM(Amount), and the alias name is sumAmount, then in the template you must say {{sumAmount}} or {{{sumAmount}}} , rather than {{Amount}} and {{{Amount}}}.


Forum|alt.badge.img+7

That worked!  Just for clarification, to display the aggregation in the template I formatted it as follows:

{{$Model.NewlyMatched_aggr.data.0.countNewlyMatched}}


e30350a208f0d22650cbc181bf114f5cd8be158c.png


Forum|alt.badge.img+17
  • Nintex Employee
  • 3763 replies
  • July 9, 2024

Perfect.  I’m totally going to steal that picture. 


Forum|alt.badge.img+7
  • 95 replies
  • July 9, 2024

How can you add up all rows of an aggregate model to display in a template?  I have a dashboard working but I need to display a number in a template from an aggregate model that has groupings.

I tried to leverage this but am not at all a javascript person.


How could I add up all rows of “OppyAggregate” model’s “sumNCVIc” (alias)?


Forum|alt.badge.img+17
  • Nintex Employee
  • 3763 replies
  • July 9, 2024

We have not exposed the API for column summaries.  Sorry.  This means the solutions discussed in the link above are really not relevant to your use case.  What I do to satisfy this requirement is create a separate aggregate model that doesn’t have the grouping for the single total number.  


Forum|alt.badge.img+7
  • 95 replies
  • July 9, 2024

Is there a way to have one table filter both models then? I’d like to have filters at the top allowing people to dig into the data in different ways and present the updated numbers.

Thanks,
Joe


Forum|alt.badge.img+17
  • Nintex Employee
  • 3763 replies
  • July 9, 2024

Take a look at Pat’s post from a few days ago:  https://community.skuid.com/t/cross-model-linked-conditions

Does exactly what you are looking for… 


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie Settings