I have a "Power Automate" workflow that runs daily, at 3 am. I have a field in a Sharepoint List called "QuoteAge" whereby, each day, I have the flow go through all jobs that are in the "Quoted" phase, and have the "QuoteAge" autoincrement by a value of 1.
The following are the current general steps:
1. 3m trigger
2. Get all items in Phase "02 Quoted"
3. Apply to Each
4. Update Item ***This is where I have my troubles***
I am trying to use the "add()" function in Power Automate, to essentially take the current "QuoteAge" value, and add "1" to it using the following syntax:
When I run it I get the following error.
InvalidTemplate. Unable to process template language expressions in action 'Update_item' inputs at line '0' and column '0': 'The template language function 'add' expects its second parameter to be an integer or a decimal number. The provided value is of type 'Null'. Please see https://aka.ms/logicexpressions#add for usage details.'.
Note: The "QuoteAge" field is a number with no decimals, and all of the items being queried in the "02 Quoted" Phase have numerical values of 0 - 2 currently. (There are no "nulls")
I think you just have your expression backwards, but I suppose it really shouldn't matter. Have you tried add(triggerOutputs()?['QuoteAge'],1) instead.
If that doesn't work, try add(1,int(triggerOutputs()?['QuoteAge']))
Hi @bmurphy3002
If you updating item inside 'Apply to each' then use the below expression for incrementing column 'QuoteAge':
if(equals(item()?['QuoteAge'],null),0,add(1,int(item()?['QuoteAge'])))
it will handle the null values also
If this helps, please remember to give a 👍 and accept my solution as it will help others in the future.
Thanks
Michael E. Gernaey
497
Super User 2025 Season 1
David_MA
436
Super User 2025 Season 1
Riyaz_riz11
244
Super User 2025 Season 1