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 / Taking all Sharepoint ...
Power Apps
Unanswered

Taking all Sharepoint Items assigned to one user, and Duplicating them under a different User.

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

The Function I am trying to create is 'Cloning' a Users objectives, and assigning to a different user.

 

The app is an Objective Setting App for our company. A manager creates unique objectives and assigns to each member of their team (up to 15 objectives per user). And we would like the function of Cloning an employees objectives for another user in a similar role.

 

We have a SP list of 'Active Objectives'.

 

Currently I've created a gallery that's filtered by any items where the 'Employee Name' = the selected user (the user they want to clone). I have then tried collecting allItems from the gallery into a collection 'cloneCollect'

 

Now I'm trying to patch in the data in the collection into the Sharepoint list with a new 'Employee Name' value.

I looked into a couple similar issues people were having, and figured out that putting the Collection data into a Gallery 'collectionGall', with 

cloneCollect' in the 'Items' field - and putting labels to populate the data. (shown Below)

JeremyVa_0-1658289097334.png 

 

and made a button to 'Clone' with the OnSelect properties as follows:

(for testing, I've just created 'txt_NewEmployee' input to manually put in a Users name to replace the 'Employee Name' field from the collection.

 

ForAll(collectionGall.AllItems,
Patch(
'Active Objectives',
Defaults('Active Objectives'),
{
'Employee Name': txt_NewEmployee.Text,
Year: Year.Text ,
Status: Status.Text,
Objective: Objective.Text,
Weight: Weight.Text,
'Objective Type': ObjectiveType.Text
}
)
);

 

 

Is there any obvious reason this isn't working?

 

I then have a gallery displaying all Items associated with the User manually entered into the 'txt_NewEmployee' field (to test if it's worked) 

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    156,127 Most Valuable Professional on at

    Hi @Anonymous ,

    I am not sure why your Gallery is not working, but you can do it straight from the collection

    Patch(
     'Active Objectives',
     ForAll(
     cloneCollect As a aPatch,
     {
     'Employee Name': aPatch.'Employee Name',
     Year: aPatch.Year,
     Status: aPatch.Status,
     Objective: aPatch.Objective,
     Weight: aPatch.Weight,
     'Objective Type': aPAtch.'Objective Type'
     }
     )
    );

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

     

  • WarrenBelz Profile Picture
    156,127 Most Valuable Professional on at

    Hi @Anonymous ,

    Just checking if you got the result you were looking for on this thread. Happy to help further if not.

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

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 June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 335 Most Valuable Professional

#2
11manish Profile Picture

11manish 166

#3
sannavajjala87 Profile Picture

sannavajjala87 71 Super User 2026 Season 1

Last 30 days Overall leaderboard