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

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
Highlighted
Helper II
Helper II

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.

View solution in original post

1 REPLY 1
Highlighted
Helper II
Helper II

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.

View solution in original post

Helpful resources

Announcements
firstImage

Super User Program Update

Three Super User rank tiers have been launched!

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

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

Top Solution Authors
Top Kudoed Authors
Users online (5,978)