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 / Patch New Record SetOp...
Power Apps
Unanswered

Patch New Record SetOptionValue error

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hello,

 

I am learning powerapps and have searched for the answer to this problem, but cannot seem to find anything that works.

I am wanting to add a new record to a dataverse table on Success of updating a form.

I have tried different ways of doing this including adding a hidden form, but it seems more logical just to patch the record as I don't need to show it to the user. I have put code into the OnSuccess method of the form that is submitted.

The syntax I am using is:
Patch(datasource, Defaults(datasource), {fieldname: data, fieldname: data});

 

I am not adding all fields to the record, which I thought is acceptable since the Defaults will add the data for fields that are not in the record values.

The error that I get is:

Incompatible type: The 'Status' column in the data source you're updating expects a 'SetOptionValue' type and you're using a 'SetOptionValue' type.

 

Status is a field in dataverse that is automatically created with the table, so I think the error message is not giving me accurate details. Nevertheless, I tried defining the Status field in the record and giving it an option but still didn't resolve the issue.

There is another lookup option field in the table. I have tried defining that in the record to be updated with a valid option but it also does not solve the problem.

 

What else should I look at? Is there any way to debug this?
Should I try defining all of the fields in the table including the automatically created fields? I didn't think this should be necessary but willing to hear suggestions 🙂

TIA

Categories:

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 405 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 368

#3
WarrenBelz Profile Picture

WarrenBelz 244 Most Valuable Professional

Last 30 days Overall leaderboard