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

Collect/Patch/Submitform Problem

Hello, I have an app I am working on and Ive tried to get it to submitform, patch and collect to a Sharepoint list. 

 

Submit form problem says- "Problem Saving Data. Data Source may be invalid" 

i tried reconnecting and everything.

 

so I tried collect and patch to the data source.

 

When i use collect i have have it in a count to submit automaticlly on the start of a timer. however it submits the same record 3 or 4 times. the timer starts when a text input states true.

 

Collect('datasourcse',{SN_x0020__x0023_:DataCardValue15_1.Text,Line_x0020_of_x0020_Failure:DataCardValue23_1.Text,Operation_x0020_of_x0020_Fail_x0:DataCardValue24_2.Text,Fail_x0020_Mode:DataCardValue25_2.Text,Fail_x0020_Tag_x0020_Creator:DataCardValue26_2.Text})

 

however when i took up the timer starting automaticlly and selct the timer and it counts down, it submits the record only 1 time..

 

I need help, i have to launch this app monday for my company and i have googled and looked up everyway i could. 

2 ACCEPTED SOLUTIONS

Accepted Solutions
Super User
Super User

Re: Collect/Patch/Submitform Problem

Hi @memegirl1994,

I have seen this behavior with one of my forms.  I have a theory that the form is somehow trying to submit twice in rapid succession, essentially trying to submit twice with the same ID.  This would trigger the error you are seeing and could also explain why delaying the submission might work.  I will do some experimenting to see if this can be prevented. Maybe, collecting the inital ID and then Patching the rest of the data into the Last record in the dataset.   Perhaps one of the other advisors may already know the solution. 

View solution in original post

Community Support Team
Community Support Team

Re: Collect/Patch/Submitform Problem

Hi @memegirl1994,

Could you please share a bit more about the error message within your app?

Could you please share more details about the Timer control within your app?

Further, do you set the Repeat property of the Timer control to TRUE?

 

The user @jtillinghast and @Craig77 have faced similar issue with you, please check the following threads:

https://powerusers.microsoft.com/t5/General-Discussion/Form-No-Item-to-Display-Data-Source-May-Be-In...

https://powerusers.microsoft.com/t5/Connecting-to-Data/Problem-saving-your-changes-The-data-source-m...

 

Please check if you have set the Repeat property of the Timer control to TRUE. If yes, the OnTimerStart property of the Timer control would be triggered continuously when the specific Text Input states true.

In addition, please also check if you have typed same formula within the OnTimerEnd property of the Timer control.

 

More details about Collect function, Patch function and SubmitForm function in PowerApps, please check the following article:

Collect function, Patch function and SubmitForm function

 

Best regards,

Kris

 

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

7 REPLIES 7
Super User
Super User

Re: Collect/Patch/Submitform Problem

 
Super User
Super User

Re: Collect/Patch/Submitform Problem

Hi @memegirl1994,

Are any of the fields in your data source Lookup or Choice type in Sharepoint?  Do you have a gallery or datatable with an Edit form? Is the Datasource the same on both the Gallery/Datatable and the Edit form?

memegirl1994
Level: Powered On

Re: Collect/Patch/Submitform Problem

So the way it works is there is one text box, they the user inputs into. 

There are multiple other text boxes that split up the text for the correct inputs for the patch. 

I use sharepoint lists. Everything is a basic default=textinput#.text

so there is a sn#, line,op #, and fail mode and creators.

The user wil input their name,sn#,Line,op# and fail mode (2x)

to ensure they input the same fail mode there is a box that checks the verifcations, when it says "True" it starts a timer. to start the patch to the sharepoint list, the form is just an edit form.

 

memegirl1994
Level: Powered On

Re: Collect/Patch/Submitform Problem

@Drrickryp so i found that for when just using the submitform function that the red error " there was a problem saving your data. the data sourse may be invalid" only comes up when i try to have a timer submit the record automatically. but when i click the timer and it counts down and submits it work perfectly find.

Super User
Super User

Re: Collect/Patch/Submitform Problem

Hi @memegirl1994,

I have seen this behavior with one of my forms.  I have a theory that the form is somehow trying to submit twice in rapid succession, essentially trying to submit twice with the same ID.  This would trigger the error you are seeing and could also explain why delaying the submission might work.  I will do some experimenting to see if this can be prevented. Maybe, collecting the inital ID and then Patching the rest of the data into the Last record in the dataset.   Perhaps one of the other advisors may already know the solution. 

View solution in original post

Community Support Team
Community Support Team

Re: Collect/Patch/Submitform Problem

Hi @memegirl1994,

Could you please share a bit more about the error message within your app?

Could you please share more details about the Timer control within your app?

Further, do you set the Repeat property of the Timer control to TRUE?

 

The user @jtillinghast and @Craig77 have faced similar issue with you, please check the following threads:

https://powerusers.microsoft.com/t5/General-Discussion/Form-No-Item-to-Display-Data-Source-May-Be-In...

https://powerusers.microsoft.com/t5/Connecting-to-Data/Problem-saving-your-changes-The-data-source-m...

 

Please check if you have set the Repeat property of the Timer control to TRUE. If yes, the OnTimerStart property of the Timer control would be triggered continuously when the specific Text Input states true.

In addition, please also check if you have typed same formula within the OnTimerEnd property of the Timer control.

 

More details about Collect function, Patch function and SubmitForm function in PowerApps, please check the following article:

Collect function, Patch function and SubmitForm function

 

Best regards,

Kris

 

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

TopShelf-MSFT
Level 10

Re: Collect/Patch/Submitform Problem

hi @memegirl1994 can you please review the response from Community Support and let us know how we can further assist? 

 

Thank you. 

 

@TopShelf-MSFT

Helpful resources

Announcements
thirdimage

Power Apps 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

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (5,719)