Post

2 followers Follow
0
Avatar

Simple math on category field

Hello.

We use Podio tool as a survey with our workers.

We use category fields to make the questions, like: "Do you like what you do in the company ?"
And the answers are numbers from 1 to 10.

I would like to calculate the sum of all the numbers selected, is that possible ?


Lucas Martins

Please sign in to leave a comment.

1 comment

0
Avatar

Hi Lucas,

yes possible. But technically the categories (answers) "1","2","3" are not numbers but text. To be able to sum them up you need to parse them to numbers. 

var cat1 = Number(@category field 1); 
var cat2 = Number(@category field 2); 
var cat3 = Number(@category field 3); 
var sum = cat1 + cat2 + cat3;
sum

Rainer

Rainer Grabowski 0 votes