Skip to main content
Best answer

How do I prevent Zapier from removing spaces from the spreadsheet-style formula?


ewager

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?

Best answer by GetUWiredBest answer by GetUWired

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.

View original
Did this topic help you find an answer to your question?
This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

4 replies

GetUWired
Forum|alt.badge.img+12
  • Zapier Expert
  • 1030 replies
  • August 4, 2023

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(numbers[i]);

}

output = [{sum}];


GetUWired
Forum|alt.badge.img+12
  • Zapier Expert
  • 1030 replies
  • Answer
  • August 4, 2023

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.


ewager
  • Author
  • Beginner
  • 1 reply
  • August 7, 2023

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


SamB
Community Manager
Forum|alt.badge.img+11
  • Community Manager
  • 7274 replies
  • February 7, 2025

Just stopping by with a quick update for anyone finding this thread in future—Zapier Tables now supports formulas! 😁🎉

You can learn more about this update here:

Happy Zapping! ⚡