Skip to main content

Hey community, I have an action that is getting certain records from a zapier table:

 

I then want to perform spreadsheet style operations on one of the outputs (in my example above, I wand to sum the amounts).

If I then use the Zapier formatter > numbers > spreadsheet style formula and the SUM formula and select my Amount outputs from the previous step, it removes the space after the comma preventing the SUM formula from working. Here’s what it looks like:

 

Any ideas on how I can keep the space in there so the formula works?

Hey @ewager,

It looks like the space is not the issue here.  From what I can tell, the issue is that you are using line items from your previous step.

I would fix this issue with a Code Step by Zapier (Javascript).  I will include a picture below.

 

This would let you add these numbers together.  I’ll also include the code below so you can copy and paste.

Hope this helps!

 

let numbers = inputData.numbers;

numbers = numbers.split(",");

let sum = 0;

for (let i=0; i < numbers.length; i++){

sum = sum + parseFloat(numbersti]);

}

output = o{sum}];


I also think I found a way to do this with your current setup with the spreadsheet formulas.  

Before the sum step, put in a step like this.

Take the text output and place it in your formula.


Hey! Thank you very much. That added step worked. Very helpful.