cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Måns
Frequent Visitor

Union Collection into sql table

Hi I need to Union a Collection in to a Sql table. I can remove rows using the app but I can´t add any. 
Collection is named: TempAccess (multiple rows)

Table is named: Access

The columns are named the same in both: UserID, AccessID and in Access they are set as Primary Key.

I´ve tired this: 
ClearCollect('[dbo].[Access]',TempAccess)

and a bunch of other stuff.

 

Any Ideas?

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Måns
Frequent Visitor

Thanks for the input @WarrenBelz 

I solved my issue this way


Collect(
'[dbo].[Access]',
TempAccess
);

 

Best regards
Måns

View solution in original post

2 REPLIES 2
WarrenBelz
Super User
Super User

Hi @Måns ,

Try

Clear(colNewCollection);
Collect(
   colNewCollection,
   '[dbo].[Access]',
   TempAccess
)

 

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.

Måns
Frequent Visitor

Thanks for the input @WarrenBelz 

I solved my issue this way


Collect(
'[dbo].[Access]',
TempAccess
);

 

Best regards
Måns

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (4,167)