Skip to main content

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

@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 }];

 


Ohhh really thank you very much !!!! amazing