cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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
Super User II
Super User II

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!
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
Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (30,321)