web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / SubmitForm error on re...
Power Apps
Unanswered

SubmitForm error on records with an N-N column in a canvas app

(0) ShareShare
ReportReport
Posted on by 7

Simplifying my scenario, I have two tables that are in a N-N relationship.  E.g., Students enrolled in Courses.  A student may be enrolled in 0 or more courses, and a course may have 0 or more students enrolled.*  This is working fine in my model-driven app through the Related tab, from both sides.  Now, to make it available in my canvas app...

* My tables are not Students and Courses, but the example is straightforward and the relationship is the same as my specific case.

 

In my Student Details screen, I have an Edit Form that I flip between View, Add, and Edit mode, as appropriate.  I have updated the card for the n-n Courses column so that the Combo Box displays the zero or more courses this student is enrolled in.  This works fine.  And, when adding a new Student, the Combo Box and card work fine, so that it saves the student's courses using Relate() because they cannot be related automatically via SubmitForm().

 

The problem comes now when I need to modify an existing student -- anything about the student, like their Name or Birthdate.  As long as I have a Courses card on the form, I cannot save changes to any Student columns: "Network error when using Patch function: The specified column is read-only and can't be modified.(I'm using SubmitForm(), not Patch(), but obviously SubmitForm() is building and invoking a Patch() behind the scenes.)

 

Super helpful message, so I turned on the Monitor, ran it again, and determined that, no matter which column I modify, when I invoke SubmitForm(), it's my Courses column that is triggering that error, even if the student is not enrolled in any Courses yet.

 

Again, in NewForm() mode, it's saving my records just fine, using Relate(), as described in Microsoft's Learn article about N-N relationships.  (That article doesn't cover updating the N-N relationship, although the use of Relate() and Unrelate() are pretty straightforward.)

So why is it that I'm getting this error when my form is in FormMode.Edit, even when I'm not touching that N-N column?  (To clarify, per that Learn article, my Course card's Update property is empty, and the values are handled during my Save action (a button) with a Collection and Relate().  (It's a good article, if you haven't seen it yet.)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 432 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 347

#3
WarrenBelz Profile Picture

WarrenBelz 254 Most Valuable Professional

Last 30 days Overall leaderboard