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

SharePoint List item updated from a calculated field in a different SharePoint List

Hi, 

 

I'm trying to update a specific field in a SharePoint List which data come from a calculated field in a different SharePoint List. I've tried this solution and this solution but I haven't been able to make it run succesfully so far. 

 

List 1 has a TOTAL COST field.

List 2 has Number 1, Number 2 and TOTAL.

Total is a calculated field in SharePoint that sums Number 1 and Number 2.

 

I've followed these steps to create Flow:

  1. When an item is created or updated (List 2)
  2. Get Items (List 1)
  3. Filter Array by CustomID (the unique field that identifies an item in List 1 and 2)
  4. Update Item in List 1
  5. TOTAL COST (List 1) = Number 1 (List 2) + Number 2 (List 2) 

    Capture3.JPG

     

    Capture4.JPG

     

  I tried to add Dynamic Content in TOTAL COST to be updated with TOTAL, but as the first one is a type number, and the second one is type calculated it is not displayed.

Capture6.JPG

 

 

 

The furthest I've achieved is to update ALL TOTAL fields instead the target one. 

For example, If I update TOTAL=22, for the item M18 in List 2

then TOTAL COST is updated to 22 for ALL items in List 1 so I assume that what is not working is the filtering.

 

Capture7.JPGCapture8.JPG

 

Any ideas?

 

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: SharePoint List item updated from a calculated field in a different SharePoint List

@Sam4:

As far as I know, calculated columns are not available via Dynamic properties.

 

That said, here is an example of a Flow that does what you are trying to do.  I am filtering the content returned from the Get Items action using an OData filter.  Please note the single quotes on either side of the value on which I am filtering.  Also, the filter uses the internal names of the SharePoint columns which may not be the same as the display names.  To see the internal name, click on the column name in list settings.  The internal name will be at the end of the URL:

&Field=InternalName

 

My expression to set the column in the list I am updating just adds the two numbers together:

add(triggerBody()?['OData__x004e_um1'],triggerBody()?['OData__x004e_um2'])

 

ODataA.jpg 

 

If this answers you question, please mark you post as Solved.

 

Scott

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott

View solution in original post

7 REPLIES 7
Super User
Super User

Re: SharePoint List item updated from a calculated field in a different SharePoint List

@Sam4:

As far as I know, calculated columns are not available via Dynamic properties.

 

That said, here is an example of a Flow that does what you are trying to do.  I am filtering the content returned from the Get Items action using an OData filter.  Please note the single quotes on either side of the value on which I am filtering.  Also, the filter uses the internal names of the SharePoint columns which may not be the same as the display names.  To see the internal name, click on the column name in list settings.  The internal name will be at the end of the URL:

&Field=InternalName

 

My expression to set the column in the list I am updating just adds the two numbers together:

add(triggerBody()?['OData__x004e_um1'],triggerBody()?['OData__x004e_um2'])

 

ODataA.jpg 

 

If this answers you question, please mark you post as Solved.

 

Scott

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott

View solution in original post

Sam4
Level: Powered On

Re: SharePoint List item updated from a calculated field in a different SharePoint List

Hi @ScottShearer

 

Many thanks, it worked! 

 

Only question if you know is the flow takes a while (around 90 seconds) to be launched after I update the field. Then it runs in 1 second. Do you have any idea why? 

 

In any case I've marked this as solution as this solved my question :).

 

Many thanks again

S

Super User
Super User

Re: SharePoint List item updated from a calculated field in a different SharePoint List

@Sam4:

 

I'm glad my suggestion works for you!

 

How quickly your Flow runs depends on your license.  It is not uncommon for a Flow to take a few minutes before it is triggered.

 

Scott

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott
Sam4
Level: Powered On

Re: SharePoint List item updated from a calculated field in a different SharePoint List

Awesome! 

 

Many thanks again for your quick and complete response @ScottShearer

MD
Level: Powered On

Re: SharePoint List item updated from a calculated field in a different SharePoint List

Wow Scott, You're my next promise of Flow, when I arrive in Flow land. 

MD
Level: Powered On

Re: SharePoint List item updated from a calculated field in a different SharePoint List

@ScottShearer Wow Scott, You're my next promise of Flow, when I arrive in Flow land. I saw many of your Flow Ideas and works, hmm I am already searching for any site associated with your name so I can follow you.  Do you have any permanent website or youtube  to  find your resources? @ScottShearer ??

Super User
Super User

Re: SharePoint List item updated from a calculated field in a different SharePoint List

@MD 

I haven't been very active lately - that changes this week....

o365scott.blog

Also, search for me on YouTube - I have a number of Flow videos there - search for "I Didn't Know I Could Do That With Office 365!"

 

Thanks!

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott

Helpful resources

Announcements
firstImage

Power Platform Online Conference

Speakers, submit your sessions now! Call for speakers ends Feb. 10!

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!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

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 Power Automate Community Video Gallery!

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (4,981)