Best answer

Increase the number with FORMATER

Userlevel 1

Hello Goodnight. I have a question, I am using the FORMATER but I am not managing to do something. I have numbers from 1 to 4. I want each zapier to increase the number. If the previous one was 1, the next zapier, it will be 2. Until it reaches 4. Then it returns to 1 again. How could I do it? :) Thank you


Best answer by ikbelkirasan 8 May 2021, 01:26

View original

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

2 replies

Userlevel 7
Badge +12

@rafaelzarro - This can be solved easily with a JavaScript code step.

const currentNumber = Number(inputData.number);
const maxNumber = Number(inputData.maxNumber);
const nextNumber = (currentNumber % maxNumber) + 1;

return [{ nextNumber }];


Userlevel 1

Ohhh really thank you very much !!!! amazing