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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Copy SharePoint list i...
Power Apps
Unanswered

Copy SharePoint list item to another list

(0) ShareShare
ReportReport
Posted on by 47

Hi All

I need to copy a SharePoint list item from one SP List to another (identical) SP list

So I am trying is 

 

UpdateContext({Item:LookUp(TestList1,ID=2)});
Patch(TestList2, Defaults(TestList2), Item);

But getting error  "Field 'Id' is required"
What, I think, might be happening, is created record (Item) got Id, which is created by system when adding new list item, and it cannot be changed. If thats a case - how do I remove Id value from Item record?

Thanks

Categories:
  • timl Profile Picture
    37,287 Super User 2026 Season 2 on at

    Hi @romankorchak1 

    You could try dropping the ID with a call to the DropColumns function

    https://docs.microsoft.com/en-gb/powerapps/maker/canvas-apps/functions/function-table-shaping

     

    UpdateContext({Item:
     DropColumns(
     Table(LookUp(TestList1,ID=2)), "ID"
     )
     }
    );
    Patch(TestList2, Defaults(TestList2), Item);

     

  • romankorchak1 Profile Picture
    47 on at

    Getting "Invalid argument type (Table). Expecting a Record value instead" . 

  • romankorchak1 Profile Picture
    47 on at

    Also tried using "First(Item)" - then getting "{Attachments}:Field 'Id' is required" error

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @romankorchak1 

    This may be a stupid question but what do you need two identical lists for?

  • romankorchak1 Profile Picture
    47 on at

    Keeping current and archived stuff separate. 

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @romankorchak1 

    I have a similar issue in my practice.  I just added a single line of text and called the column Active.  In my apps, I filter the same list on that column to separate out the Active patients from the Inactive ones. 

  • timl Profile Picture
    37,287 Super User 2026 Season 2 on at

    @romankorchak1 

    I think I see my mistake - can you try this?

    UpdateContext({Item:
     First(DropColumns(
     Table(LookUp(TestList1,ID=2)), "ID"
     ))
     }
    );
    Patch(TestList2, Defaults(TestList2), Item);
  • romankorchak1 Profile Picture
    47 on at

    Tried it with "First()" - getting "{Attachments}:Field 'Id' is required" error

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 402 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 296 Most Valuable Professional

Last 30 days Overall leaderboard