Calculating the total number of simple enquiries raised

Hi
I need to calculate the total number of simple enquiries raised based on values in 3 fields.

  • Service name
  • Method of contact (Phone, Face to face)
  • Number of cases

Any help appreciated.

Thanks
Mihiri

Hi @Mihiri.Kotalawela ,

How to get a total number will depend on your configuration/architecture. But assuming your configuration, you’ll need to create an aggregate composite. Here you’ll be able to specify the type of aggregate (e.g. count, sum, etc). You would you ‘Count total’ and specify what you want to count.

Based on the description provided, I’m assuming these are ‘enquiries’ across all records, so you’re looking for a global number? If so, then you will need to ensure the ‘Global’ checkbox is checked for your aggregate composite, which will count the number across all records within the object.

Hope this helps :slight_smile:
If not, let me know and I will have a look at your architecture and advise as such.

Hi @ali.bandali
Thank you for the response.

Apologies if my question was not clear enough.

If I select ‘Planning’ from ‘Services’ dropdown, ‘Telephone’ from ‘Method of contact’ option field and entered ‘2’ for ‘Number of cases’ integer field, system should record that there are 2 Planning cases answered via ‘Telephone’

Thanks
Mihiri

Hi @Mihiri.Kotalawela ,

Thank you for providing further information, that really helped get an idea of what you’re looking to achieve.

I initially thought you wanted to create a count that would provide the number of records that match a specified criteria, but the fact you already have an integer i’m assuming you want just a text composite to display the content? If that’s the case, a simple text-based composite would work by adding in your fields and fixed text to produce the string you want. e.g. [Number of cases field] [Services field] cases answered via [Method of contact field]

If not, and you’re looking for a count, then my advise I provided should provide you with what you will need to build this. How I would build this is to create an aggregate composite, with the aggregate ‘Count total (having value)’. This will provide you with a number of records. Within the aggregate composite, you could then provide a subset constraint which would filter the number of records down to the desired result.

For example, your subset constraint could have filters as such:
Services, Equal to, Planning
AND
Method of contact, Equal to, Telephone

This will the aggregate the number of records that meet that subset criteria. Although i’m not sure what you’d use the ‘Number of cases’ for, but this is just a relative example, which you can apply and build this however you like in your build.

Hope this helps :slight_smile:

hi @ali.bandali
Thanks a lot for the instructions. Yes, what I want is for a count. I have created the composite subset. But it still doesn’t display the correct value :frowning:


I assume its because this needs to be triggered using an event an a rule?

I’ve created a form submission event and a rule. But not sure whether its correct.

Report
image

image

Am I asking for too much? sorry

Thank you so much
Mihiri