cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Frequent Visitor

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

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
Community Support

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 II
Super User II

 
Super User II
Super User II

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?

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.

 

@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.

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
Community Support

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

Anonymous
Not applicable

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

 

Thank you. 

 

@Anonymous

Helpful resources

Announcements
News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

Power Apps Community Call

Power Apps Community Call- January

Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

Top Solution Authors
Top Kudoed Authors
Users online (10,543)