cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Spawn10
Helper II
Helper II

How do I increase the value in a column each time my flow runs?

I am creating a flow that runs daily to create items in a SharePoint list. It first checks to see if the item already exists, if not...then it creates it in the list, and updates a number column to 1. This part works just fine.

If the item already exists, I want to increase the value in the number column. So if the value in the number column is 1, I want to increase to 2. When it runs the next time, if that value is 2, I want to increase it to 3...I have not been able to get this to work.

How do I go about getting this done?

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @Spawn10 

Your flow looks like fine! So I would check if the "NumberOfReviews" is null or empty, although I think it should never be because when you create the item, you initialize it to 1. Could you use this expression?:

add(int(coalesce(item()?['NumberOfReviews'],1)),1)

Apart from that, is that column an integer one?

Regards,

Ferran

Did I answer your question? Please consider to mark my post as a solution to help others.
Proud to be a Flownaut!

View solution in original post

3 REPLIES 3
fchopo
Super User
Super User

Hello @Spawn10 

Using the add() function you can sum some numbers. Could you share a screenshot of your flow, so we can provide more detailed help?

Regards,

Ferran

Did I answer your question? Please consider to mark my post as a solution to help others.
Proud to be a Flownaut!
Spawn10
Helper II
Helper II

Hi @fchopo 

Thanks for the response. Here is what my flow is currently looking like...1st steps.pngGetting items.pngSetting numberofreviews.pngUpdate numberofreviews.JPG

my add() looks like this 

add(item()?['NumberOfReviews'],1)

Hi @Spawn10 

Your flow looks like fine! So I would check if the "NumberOfReviews" is null or empty, although I think it should never be because when you create the item, you initialize it to 1. Could you use this expression?:

add(int(coalesce(item()?['NumberOfReviews'],1)),1)

Apart from that, is that column an integer one?

Regards,

Ferran

Did I answer your question? Please consider to mark my post as a solution to help others.
Proud to be a Flownaut!

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Users online (2,204)