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
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 83 members 5,261 guests
Please welcome our newest community members: