Skip to main content

Hi

I would like to create a number field "recall" that each time the record is update make something like that: recall = recall +1.

I used the automation with the update record filter and I try to apply formula on the recall filed by used a formula like tahs: SUM({recall}, 1) but it is returned an error about the format of the value.

Do you have idea how to increment the value?

For the moment I fixed by add string +1 and the result is "+1+1+1+1+1" for each time the update is execute.

Thanks

You can easily do this with a script block. ChatGPT helps write these scripts - I've recorded a little video showing how.

That said, I would pass the Richiami number into the script, then use the newly created number (from the script) as the data to update your field.



Here is the code:

// Get the input number from the previous step let inputNumber = input.config().inputNumber; // Replace 'inputNumber' with the actual field name or variable name containing the number // Ensure inputNumber is a valid number or set it to 0 if blank if (inputNumber === '' || isNaN(inputNumber)) { inputNumber = 0; } // Increment the number by one const incrementedNumber = inputNumber + 1; // Save the incremented number as a variable output for future automation steps output.set('incrementedNumber', incrementedNumber);

 


@dirende 

No scripts are necessary for this. You just need to change your “RICHIAMI” field to a number field instead of a text field.

Then, create a new formula field back in your base with the value that you want it to be after running the automation. Your formula field will be {RICHIAMI}+1.

Then, when you run the automation, just set your number field to the value of the formula field.

Hope this helps! If you’d like to hire the best Airtable consultant to help you with anything Airtable-related, please feel free to contact me through my website: Airtable consultant — ScottWorld


@dirende 

No scripts are necessary for this. You just need to change your RICHIAMI field to a number field instead of a text field.

Then, create a new formula field back in your base with the value that you want it to be after running the automation. Your formula field will be RICHIAMI+1.

Then, when you run the automation, just set your number field to the value of the formula field.


hi

Thanks for feedback.

I tried this solution but I received a wrong format value.

I resolved by creating a hide string field that adds each time a "+" in the field each, and I created a formula field that counts this  "+" in this hide field.

Thanks


You can easily do this with a script block. ChatGPT helps write these scripts - I've recorded a little video showing how.

That said, I would pass the Richiami number into the script, then use the newly created number (from the script) as the data to update your field.



Here is the code:

// Get the input number from the previous step let inputNumber = input.config().inputNumber; // Replace 'inputNumber' with the actual field name or variable name containing the number // Ensure inputNumber is a valid number or set it to 0 if blank if (inputNumber === '' || isNaN(inputNumber)) { inputNumber = 0; } // Increment the number by one const incrementedNumber = inputNumber + 1; // Save the incremented number as a variable output for future automation steps output.set('incrementedNumber', incrementedNumber);

 


Thanks for your feedback.

Unfortunately, I have only a free account, and I cannot execute the script, but the solution is very clear.

 

 


@dirende 

No scripts are necessary for this. You just need to change your RICHIAMI field to a number field instead of a text field.

Then, create a new formula field back in your base with the value that you want it to be after running the automation. Your formula field will be RICHIAMI+1.

Then, when you run the automation, just set your number field to the value of the formula field.


Good call. This is a more elegant method to the same outcome. 👍