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

Error submitting a form

I created a custom entity with custom field before creating an app. I chose “creating an app with data” and chose the entity I just created.

The PowerApp instantly built a form for me automatically but the problem happens when I tried to add a new form and it will pop up an error like “.... the data source is invalid” and the coding for “SubmitForm(Form1) will have an “X” red colour icon when the coding is clearly correct.

Anybody know how to settle this? Been stuck for hours
9 REPLIES 9
cds
Level 8

Re: Error submitting a form

Screenshot the error and your formula please!

Super User
Super User

Re: Error submitting a form

Is your form set to FormMode.New?

Highlighted
ywliang96
Level: Powered On

Re: Error submitting a form

Here's the error I got when i tried to submit a form

 p1.PNG

 

While the button suddenly have this error 

p2.PNG

 

I tried clicking on the formula area and this error leads me to this part. I'm sure it's correct isn't it?

p3.PNG

ywliang96
Level: Powered On

Re: Error submitting a form

I use SubmitForm(Form1)

cds
Level 8

Re: Error submitting a form

Screenshot your error and formula to achice solution

Super User
Super User

Re: Error submitting a form

Hi @ywliang96 

I would try refreshing your data source to see if that helps.

You can do this through the View > Datasources menu item. Against your CDS data source, you'll find a 'Refresh' menu item when you click the '...' button.

Community Support Team
Community Support Team

Re: Error submitting a form

Hi @ywliang96 ,

Have you taken a try to submit your form data using Patch function?

 

Based on the issue that you mentioned, I have made a test on my side, and don't have the issue that you mentioned. Please consider create a Blank app, and then add your CDS Entity as data source within it, then add your New Edit form, check if the issue is solved.

 

Also please consider clear cache of your browser, then sign in your PowerApps again, then re-generate an app from your Entity, check if the issue still exists.

 

Please also consider submit your Form data using Patch function instead of SubmitForm function, the standard Patch formula as below:

Patch(
          'Your Entity',
           Defaults('Your Entity'),
           EditForm1.Updates
)

or

Patch(
          'Your Entity',
           Defaults('Your Entity'),
           {
Column1: DataCardValue1.Text,
Column2: DataCardValue2.Text,
...
} )

 

Best regards,

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

Re: Error submitting a form

Did you ever say if it has a FormMode of New or Edit? I've only ever seen this when it is an Edit form. 

Super User
Super User

Re: Error submitting a form

Thanks for the heads up @timl .

I'm having this exact same experience right now except with a Canvas App submitting a Form:

https://powerusers.microsoft.com/t5/Building-PowerApps-Formerly/Data-Source-May-Be-Invalid/m-p/38409...

- Worked fine yesterday

- Added a Person-type field in the Sharepoint list

- The other Person-type fields (2 others) in the Form started acting up after this

- Refreshed/Removed/re-added Data Source

- Tried on both VPN and WiFi

- Tried on both laptop browser and iPhone

- Tried in both Editor and Player

 

- Another symptom and the reason I added another Person-type column to the Data Source:

  - Searching for People in Comboboxes backed by Sharepoint Person-type columns is hit or miss

  - Sometimes they work: When I type a name, results pop up

  - Sometimes they don't work: When I type a name, nothing happens


Issue persists. Please advise on some ideas for tackling this. 

Thank you

 

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 (Last 30 Days)
Users online (4,948)