web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Automate
Unanswered

Auto Increment by 1

(0) ShareShare
ReportReport
Posted on by 5

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: 

add(1,triggerOutputs()?['QuoteAge'])

 

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")

Categories:
I have the same question (0)
  • Verified answer
    ManishSolanki Profile Picture
    15,091 Super User 2025 Season 2 on at

    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

  • David_MA Profile Picture
    12,966 Super User 2025 Season 2 on at

    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']))

  • bmurphy3002 Profile Picture
    5 on at
    Thank you very much! This was a big help. It appears to be working!!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard