cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Orvyn
Helper I
Helper I

Patching only selected columns to a SQL Data source

Hi there, 

I need to create an app working "offline". This works fine by making use of collections. However, I need to link two collections but I dont have a primary key yet, this gets created in SQL. I'm adding a column to a collection simply but (collect) and using GUID() as a temp primary key so I can link the two collections. 

I now have a challenge when trying to patch to the SQL table Patch(SQLTABLE, collection), due to the additional collumn. I there a wayt to patch only selected columns from the collection or drop die "GUID" column? 

Or should I try something else? 

 

Kind Regards

2 ACCEPTED SOLUTIONS

Accepted Solutions
Nogueira1306
Community Champion
Community Champion

Hey! Of course

 

Use a filter or a lookup
ForAll(

Patch(Filter(colection; Selected = true),

Defaults(SQL),

{

...

}

)

)

 

Something like that

 

If you need additional help please tag me in your reply and please like my reply.
If my reply provided you with a solution, pleased mark it as a solution ✔️!

Best regards,
Gonçalo Nogueira

Check my LinkedIn!

Check my User Group (pt-PT)!

Last Post on Community

View solution in original post

Ah thanks so much @Nogueira1306 for you help. This works perfect😀

View solution in original post

2 REPLIES 2
Nogueira1306
Community Champion
Community Champion

Hey! Of course

 

Use a filter or a lookup
ForAll(

Patch(Filter(colection; Selected = true),

Defaults(SQL),

{

...

}

)

)

 

Something like that

 

If you need additional help please tag me in your reply and please like my reply.
If my reply provided you with a solution, pleased mark it as a solution ✔️!

Best regards,
Gonçalo Nogueira

Check my LinkedIn!

Check my User Group (pt-PT)!

Last Post on Community

View solution in original post

Ah thanks so much @Nogueira1306 for you help. This works perfect😀

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Power Apps Community Call Jan. 2022 768x460.png

Power Apps Community Call

Please join us on Wednesday, January 19th, at 8a PDT. Come and learn from our amazing speakers!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (2,089)