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 Apps
Unanswered

Copying item

(0) ShareShare
ReportReport
Posted on by 525

Hi Community,

 

I'm having 2 tables. 1 is products and another is versions. each product is tied up with version using product id column. once a product is created i've to tag it to the version. and we're allowing user to copy the selected items from a gallery(which is sql view with products + versions) which will have list of products. 

 

1. on selection of products i'm collecting the products to a separate collection

2. then on click of copy product button. I'm using the following formula

 

ForAll(
 colSelectedItems,
 Collect(
 colProdCopy,
 LookUp(
 dbo.Products,
 ID = colSelectedItems[@Product_ID]
 )
 )
);

ClearCollect(colVerCopy,
ForAll(
 colProdCopy,
 Patch(
 dbo.Products,
 Defaults(dbo.Products),
 {
 Product_Name: colProdCopy[Product_Name],
 Brand: colProdCopy[@Brand],
 }
 )
).ID);

RenameColumns(colProdCopy,"ID","Product_Versions_ID");
Patch(
 dbo.Versions,
 AddColumns(
 colVerCopy,
 "Version",
 "1.0",
 "CreatedDt",
 Now(),
 )
);

 

Here I'm trying to collect the newly created product ID's from the patch into a collection.  somehow i'm not able to get the ID's it's throwing error. any thoughts. what i'm doing wrong here. or is there any other process to achieve this ?

 

Categories:
I have the same question (0)

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
Haque Profile Picture

Haque 94

#2
WarrenBelz Profile Picture

WarrenBelz 82 Most Valuable Professional

#3
Kalathiya Profile Picture

Kalathiya 38 Super User 2026 Season 1

Last 30 days Overall leaderboard