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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Automate
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")

Categories:
I have the same question (0)
  • Verified answer
    Manish Solanki Profile Picture
    15,167 Moderator 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
    14,090 Super User 2026 Season 1 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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 592

#2
Valantis Profile Picture

Valantis 340

#3
11manish Profile Picture

11manish 284

Last 30 days Overall leaderboard