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 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!
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
MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MSFTBizAppsLaunchEvent

Experience what’s next for Power Virtual Agents

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Users online (39,309)