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 / Copying Multiple Items...
Power Apps
Unanswered

Copying Multiple Items in SharePoint filtered by a column which also needs to change

(0) ShareShare
ReportReport
Posted on by 19

Hi all,

Another complicated request for help so if anyone can even point me in the right direction I would be very grateful.

I have a working app where teachers can request chemicals and equipment for experiments. I am trying to develop a way for a teacher to copy an experiment again, so that the chemicals and equipment are all filled in.

The first part of the experiment request I have managed to make copy over as it is a simple form. However, the next part is trickier.

The requested chemicals/equipment are stored as an individual item on a sharepoint list with a Reference column that is the ID of the first part of the request which is in another sharepoint list.

For example, if I had an request named "Experiment 1" and it had an ID of "1" all the chemicals/equipment requested would have "1" in their Reference column.

I would like a way to copy all the chemicals/equipment with 1 in that reference column but also change their reference to a new number.

I tried to do this with ForAll and with Collections but I wrote myself in circles.

I hope that is clear but if you want to help and need clarification please just ask!

Categories:
  • eka24 Profile Picture
    20,925 on at

    Please give an example with a sample table. I get the sense you can use AddColumns

    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

  • MrCurzey Profile Picture
    19 on at

    Hi,

    I have attached the tables here.

    This is the first table, 'Requisition' which is where the main information is stored from the form. Notice the ID.

    Table for requisition.png

    And then this is the 'requisition chemicals' table which is where the information about each chemical requested is stored. The column "Req ID" is just a number column but references the ID of the main information in the first table.

    Table for requested chemicals.png

    There is also a table for requisition equipment as there is slightly different details required to the chemicals, but works in exactly the same way.

    Hopefully this helps you understand better?

  • eka24 Profile Picture
    20,925 on at

    Test with these two Collections and give feedback:

    ClearCollect (MyTable, AddColumns (Requisition,"NewID",ID))

     

    And

     

    ClearCollect (MyTable2, AddColumns (Requisition,"NewID", LookUp ('Requisition Chemicals','Req ID'=Requisition.ID)))

    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

  • MrCurzey Profile Picture
    19 on at

    I put these on a button but it didn't like the commands, it said "invalid argument type, expecting Boolean, number, text". Although I'm not sure where you wanted me to test them.

  • eka24 Profile Picture
    20,925 on at

    Put the formula Onvisible of the screen or OnSelect of a Button. Also show a screenshot of the error.

    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

  • MrCurzey Profile Picture
    19 on at

    Screenshot (4).png

    Screenshot (5).png

  • eka24 Profile Picture
    20,925 on at

    The formulas are two separate. I asked that you test both to see which one suit you best. If you want to put them together, it should be;

     

    ClearCollect (MyTable, AddColumns (Requisition,"NewID",ID));

    ClearCollect (MyTable2, AddColumns (Requisition,"NewID", LookUp ('Requisition Chemicals','Req ID'=Requisition.ID)))

     

    After that check the Collection: File... Collection

    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 248 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 192 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 135

Last 30 days Overall leaderboard