cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ericonline
Community Champion
Community Champion

Data Source May Be Invalid?

Anyone else getting errors when trying to submit a PowerApps Form to Sharepoint?

- Happens in BOTH PowerApps Studio and the Player

- Happens on BOTH laptop browser and iPhone player

image.png
- The only red "x" is on the SubmitForm() statement

- Red squiggles stat: "An unknown error occurred". 

image.png

Tried so far:

- Closing/reopening the app

- Removing/re-adding data source (Sharepoint list)

- Selecting a different Sharepoint Connection

- Checking all Sharepoint Connections in make.powerapps.com - Data - Connections. All showed "Connected"

- Checked https://powerapps.microsoft.com/en-us/support/, no issues

image.png

 

Ideas?

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
ericonline
Community Champion
Community Champion

Found it!
Had to delete a complete DataCard.

Details:

  • Data Type: Sharepoint Person-type column
  • Update: combobox.Selected  //AHA!
  • Control Type: Combobox
  • Items: Choices(SPListName.personTypeColumn)
  • Default: <blank>
  • DefaultSelectedItems: <blank>

Background:

  • When Sharepoint list was created, the original Person-type column had "Select Multiple" toggled OFF
  • The app was built and the Form connected to the List
  • Later, it was deemed we needed Multi-select for this field
  • "Select Multiple" toggled ON in the SP list
  • "Allow multiple select" toggled ON in the app
  • However, this field would NOT write multiple names to the Sharepoint list no matter what I did
  • Today, I decided to add a NEW Person-type field to the SP list with "Select Multiple" toggled ON
    • Left the old Person-type field in place
  • Added the new field to the Form and copied over all the styling
  • Noticed TWO differences between this new Person-type column and the original
    • Items property is set to: Choices([@SPListName].personTypeColumn) by default!
      • Why disambiguation like this by default?
    • Update property is set to:  newCombobox.SelectedItems by default
  • Last note: The old Person-type column WOULD NOT ACCEPT .Selected.Items. 
    • Errored out with "Expected a record"

View solution in original post

7 REPLIES 7
timl
Super User
Super User

Hi @ericonline 

I've not seen this problem myself, but I noticed this post the other day that looks suspiciously similar.

https://powerusers.microsoft.com/t5/Building-PowerApps-Formerly/Error-submitting-a-form/m-p/382645#M...

I thought the fix might be a simple case of refreshing the datasource but from what you're seeing, perhaps there's a deeper problem in the PowerApps/SharePoint connector infrastructure.

ericonline
Community Champion
Community Champion

hm...

Appears to be an issue with the Form. 

Troubleshooting:

  • Create a new blank screen
  • Add an Edit Form Control
  • Add all Fields to Form
  • Add a Button Control to screen
  • OnSelect: SubmitForm(formName)
  • Submits without issue...

What are some things I could look at in regards to the Form?

That sounds really strange, I'm not sure what to suggest.

Perhaps you could try copying and pasting the form that doesn't work into a new screen and seeing whether that works? If it does, perhaps that might suggest that the specific instance of the original form has somehow become corrupt? 

 

ericonline
Community Champion
Community Champion

Copyin the Form to blank screen and submitting results in same error.

Cover me... i'm goin in for some deep debugging now...

Hehe! Good luck Eric!

ericonline
Community Champion
Community Champion

Found it!
Had to delete a complete DataCard.

Details:

  • Data Type: Sharepoint Person-type column
  • Update: combobox.Selected  //AHA!
  • Control Type: Combobox
  • Items: Choices(SPListName.personTypeColumn)
  • Default: <blank>
  • DefaultSelectedItems: <blank>

Background:

  • When Sharepoint list was created, the original Person-type column had "Select Multiple" toggled OFF
  • The app was built and the Form connected to the List
  • Later, it was deemed we needed Multi-select for this field
  • "Select Multiple" toggled ON in the SP list
  • "Allow multiple select" toggled ON in the app
  • However, this field would NOT write multiple names to the Sharepoint list no matter what I did
  • Today, I decided to add a NEW Person-type field to the SP list with "Select Multiple" toggled ON
    • Left the old Person-type field in place
  • Added the new field to the Form and copied over all the styling
  • Noticed TWO differences between this new Person-type column and the original
    • Items property is set to: Choices([@SPListName].personTypeColumn) by default!
      • Why disambiguation like this by default?
    • Update property is set to:  newCombobox.SelectedItems by default
  • Last note: The old Person-type column WOULD NOT ACCEPT .Selected.Items. 
    • Errored out with "Expected a record"

That's some good debugging - glad you found the cause of the problem. Very well done!

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Changes to Ideas Coming

We are excited to announce a new way to share your ideas for Power Apps!

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