Create a Sum of Multiple Fields

Hi Guys,

So I am working on a CMS for an NGO. There is a custom module I created - DLA (Daily Living Activities), which have the staff rate their candidate’s emotional status based on a few standard questions. All of the fields in the module use the same dropdown menu. How can I sum up all of these values so I get a final score/rating.

I have attached a screenshot for your review.
Screenshot 2020-06-29 at 10.59.00 AM
So as you see, there are about a dozen questions and all of them have the same dropdown option. I need to create a workflow where the system calculates the sum of all the answers and divides them by 2.

Can anyone please help me with this?

Check this sample:



I didn’t understand a word on that page :slight_smile:
Do you have any other reference that I can check?

as usual when it comes to requests like this, you can either use workflows or logic hooks. Both allow you to automatize things, but in different kind of ways:

  • Workflows are more end-user friendly and don’t require php knowledge, but they have limited functionality
  • logic hooks require php knowledge and code customizing, but you’re basically not limited in what you do.



If you want to use workflows, the method to add variables is

{add(parameter1; parameter2)}

so {add(3.12; 4.83)} returns 7.95. If you need to add multiple values, you can also combine more than one add function like this:

{add({add(parameter1; parameter2)}; parameter3)}
(returns parameter1+parameter2+parameter3)