Skip to main content
Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

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

  • bmurphy3002 Profile Picture
    5 on at
    Re: Auto Increment by 1
    Thank you very much! This was a big help. It appears to be working!!
  • David_MA Profile Picture
    11,767 Super User 2025 Season 1 on at
    Re: Auto Increment by 1

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

  • Verified answer
    ManishSolanki Profile Picture
    15,085 Super User 2025 Season 1 on at
    Re: Auto Increment by 1

    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

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1