Open bryllyg opened 3 years ago
Hey @bryllyg,
I think you might be able to get a count on how many are active by plucking the data, stringifying the array and then counting the occurrences of "Active"
{{occurrences (stringify (pluck Engagements "Status")) "Active"}}
Please bear with me, if my response is not proper, I am new to Github. Any recommendations on a better response format would be appreciated.
Hi @Devilthehell, Thanks! That's very helpful. I don't currently have access to pluck (it's not in the build of PnP Search I'm working with) but I'll get in a request for it :-)
Hi,
I still learning what I can and can't do in handlebars. I'm trying to figure out if I can get a count of a subset (filtered by field value) of the search query. For example, if I search for 'Engagements' and it returns 120 items, I would like to then be able to show that within those 120 items 23 are 'Active'. I've read through the handlebars info and tinkered, but I'm not sure this is doable with the helpers provided. Am I missing something? Thanks for any advice!
H