cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
PhilipGoodfello
Level: Powered On

For each item, add 1 to sharepoint number column

I can believe I am finding this so difficult.

 

All I want do is:

Inside a For Each loop:

   Get the value of a column ('Reminders') - type number

   Add 1

   Update Item with new value.

 

I have the update working but have not cracked the "retrieve the value and add 1"

 

Tried:

1. Compose > Expression > Add('Reminders',1)    :  it says it is returning a string value

2. Using Initialize variable    : it says I can't use initialize inside For Each.

 

Surely this is really simple and I am missing the obvious - but google searches are not throwing it back to me!

 

 

 

 

 

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
PhilipGoodfello
Level: Powered On

Re: For each item, add 1 to sharepoint number column

To answer my own questions:
 
Compose > Expression >  

Add(items('Apply_to_each')?['Reminders'],1)
 

Edit: to find the first argument for the Add function:
In Compose select ‘Reminders’ (or your column name) from dynamic content. Then, hover over it with the mouse pointer. The code for the expression shows up.
1 REPLY 1
PhilipGoodfello
Level: Powered On

Re: For each item, add 1 to sharepoint number column

To answer my own questions:
 
Compose > Expression >  

Add(items('Apply_to_each')?['Reminders'],1)
 

Edit: to find the first argument for the Add function:
In Compose select ‘Reminders’ (or your column name) from dynamic content. Then, hover over it with the mouse pointer. The code for the expression shows up.

Helpful resources

Announcements
firstImage

Microsoft Flow Online Conference

Join us for a FULL day of FREE Microsoft Flow Sessions from some of the best minds in the industry!

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020

thirdimage

Flow Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

thirdImage

New Flow Community Board!

Check out the new Microsoft Flow Community Blog Topic Suggestion board!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 52 members 3,890 guests
Please welcome our newest community members: