web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Copy some data from on...
Power Automate
Unanswered

Copy some data from one sp list to another

(0) ShareShare
ReportReport
Posted on by

Hi All

I am working on a scheduled flow that needs to take some data from one SP List and update another SP List.

So I need to Get Items from FromList and update MonthlyTotals where column 'OfficeId' matches.

So I Get Items from FromList and then do ApplyToEach on FromList.

And the question is - in ApplyToEach how do I get an ID of an item in MonthlyTotals that I need to update  

UpdateItem2.JPG

Thanks

Categories:
I have the same question (0)
  • abm abm Profile Picture
    32,865 Most Valuable Professional on at

    Hi @Anonymous 

     

    To update the Monthly Totals list you need action step Get Items and set Filter Query. Using this results you should be able to get the ID of the related item you want to update.

  • abm abm Profile Picture
    32,865 Most Valuable Professional on at

    Hi @Anonymous 

     

    See below example here I am trying to filter a column value called UPN equals 100 and updating the list item against the id. 

     

    image.png

     

    If you have any questions please let me know.

  • Community Power Platform Member Profile Picture
    on at

    So if I have a list with 1000 records I will need to do 1000 GetItem`s? 

  • abm abm Profile Picture
    32,865 Most Valuable Professional on at

    Hi @Anonymous 

     

    It depends the filter. If your filter query can get only one record per query and update then yes you need 1000 Get items to find each records id. If you have more than one record per filter then you can do it in a foreach loop to execute the update with different id's.

     

    The main difference here is

     

    Select id from employee where country = 'UK'

     

    So in this instance you may have more than one records where people living in one country. This can return one or more records.

     

    Select id from employee where country = 'UK' and email = 'test.com'

     

    So in this instance you may have only one record you are expecting. To be able to get other employees id you need to execute another select with another email address.

     

    Hope you understood what I am trying to explain here.

     

    Thanks

  • Community Power Platform Member Profile Picture
    on at

    Can I make an object value and then in ApplyToEach on MonthlyTotals (all, without filtering) add its ID as a property of the object (something like Object[OfficeId]=ID , OfficeId is unique)  so it can by used when updating values in ApplyToEach on FromList (do UpdateItem on MonthlyTotals with ID set to Object[OfficeId]). I just could not find how to add a property to the object.

    Hope it make sense

    Thanks

  • abm abm Profile Picture
    32,865 Most Valuable Professional on at

    Hi @Anonymous 

     

    Not sure you can. Still you need you internal id to update. This is like a primary key. Yes your office id may be unique but for each records the primary key is different. You can collect all the office id's in an array and iterate the array but still you need to get the id's (internal value) for the update. Hope it make sense.

     

    Thanks

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard