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

Report
All responses (
Answers (