cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MrDannyHarry
Resolver I
Resolver I

Cant patch collection to SQL

I have a collection which I am trying to patch into a SQL DB.

 

The column names match and so do the data types but when i press the button to Patch it nothing happens.

I get no errors and nothing gets added to the SQL table.

 

The SQL Table Design:
DBDesign.PNG

The Collection:

Collection.PNG

 

The code I am using:

 

 

Collect(
    '[dbo].[answers]',
    Q_Answers
)

 

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
eka24
Super User
Super User

Try:
ForAll(CollectionName, Patch(

                '[dbo].[answers]',

                Defaults('[dbo].[answers]'),

                {Q_Answers: ColumnNameInCollection})

 

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

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.

 

 

View solution in original post

@eka24 

 

Thought I had replied to this. It seemed all I needed to do was restart the App and it worked fine.

Not sure what caused it.

View solution in original post

4 REPLIES 4
eka24
Super User
Super User

Try:
ForAll(CollectionName, Patch(

                '[dbo].[answers]',

                Defaults('[dbo].[answers]'),

                {Q_Answers: ColumnNameInCollection})

 

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

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.

 

 

View solution in original post

@eka24 

Thanks I will give this a go but I don't want to use this a permanent solution as this is a lot of patches against the database.

 

I will wait for your feedback

@eka24 

 

Thought I had replied to this. It seemed all I needed to do was restart the App and it worked fine.

Not sure what caused it.

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!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

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

Users online (1,810)