Hi All,
I'm wondering if someone can explain to me why PowerApps is throwing up an error for this? What should the correct code be?
Thanks
It looks like you are using a gallery with an edit form -- any reason you aren't using SubmitForm() here?
This Patch() won't work because ThisItem doesn't have context outside of the form control. If you are using the gallery to select the record for the edit form, you can reference the gallery record instead:
Patch('Request-New-Transmittal',
myGallery.Selected, // Change this name to match your gallery's selected record
{
'Task Order': DataCardValue8.Selected.Value
}
)
Note, I made a change to your Task Order entry to point towards the Value of the dropdown - that could show an error too.
Hope that helps,
Bryan
HI @BCLS776 the only reason I am not using SubmitForm was because I thought Patch function was for UPDATING SharePoint list items, and Submit form was for new ones? If submit form works then I will just use that?
Both SubmitForm and Patch can be used for both adding records and updating records. When using SubmitForm, check the DefaultMode of the form - you would be looking to have it set for FormMode.Edit. Calling the EditForm() function will set the form to FormMode.Edit, and then SubmitForm will update the record. Have a look at this documentation for more info.
Hope that helps,
Bryan
User | Count |
---|---|
144 | |
97 | |
89 | |
78 | |
56 |
User | Count |
---|---|
194 | |
185 | |
105 | |
99 | |
91 |