cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
JonasH
Level: Powered On

Collect/Patch saves one record more than one time

Hi,

I want to store data in a collection and upload it to a SQL-DB later on.

The problem is, that the collect and patch statement saves the data multiple times in the collection.

To save the data to the collection I used the following statement:

Collect(pics,{
Uploadedby:User().FullName,
FileName:input_takenpicturename.Text,
ImageContent:TakenPic,
UploadedTime:Text(Now(),DateTimeFormat.UTC),
PositionGUID:EditPosition.GUID});

To take a Picture I used the following statement:

UpdateContext({TakenPic:Camera1_2.Stream}) 

Here is a quick example:2019-10-21 14_20_56-ONCR - Saved (Unpublished) - PowerApps.pngThis is how I want to save the Picture to the collection. Its the picture above the textbox with textbox input as the title.

If I hit the save button the result looks like this:2019-10-21 14_21_11-ONCR - Saved (Unpublished) - PowerApps.png

Sometimes the pictures are saved once and other times more than three times!

 

Thanks for your help.

1 ACCEPTED SOLUTION

Accepted Solutions
JonasH
Level: Powered On

Re: Collect/Patch saves one record more than one time

I solved it on my own.

To sync the collection with my SQL-DB I used multiple timers. All with the same function.

In one of the last updates they added the feature, that timers can run in background.

The problem was, that the same images were uploaded by multiple timers simultaneous.

View solution in original post

1 REPLY 1
JonasH
Level: Powered On

Re: Collect/Patch saves one record more than one time

I solved it on my own.

To sync the collection with my SQL-DB I used multiple timers. All with the same function.

In one of the last updates they added the feature, that timers can run in background.

The problem was, that the same images were uploaded by multiple timers simultaneous.

View solution in original post

Helpful resources

Announcements
New Ranks and Rank Icons in April

'New Ranks and Rank Icons in April

Read the announcement for more information!

Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

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