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 Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Carousel_PP_768x460_Wave2 (1).png

2022 Release Wave 2 Plan

Power Platform release plan for the 2022 release wave 2 describes all new features releasing from October 2022 through March 2023.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Top Solution Authors
Users online (3,240)