I am learning that the Patch Function and the SubmtForm does the same in terms of updating the SourceData. What is the difference? and When do I use one versus the other?
Typically I use Patch if:
Only changing a one or two fields
Changing or Creating data that is not entered by user (button click updates status or something like that)
Updating items in a gallery
Just can't make my screen layout work in a form
Unless you have a REASON to use Patch then use SubmitForm is my suggestion.
In addition to what @mdevaney describes, you can use patch to submit multiple forms.
An example:
Patch(
SharePointSourceList,
GalleryRecentItems.Selected,
Form1.Updates,
Form2.Updates,
Form3.Updates,
Form4.Updates);
Navigate(ScreenSuccess)
@Canadiansal
You are correct: SubmitForm and Patch do the same thing.
SubmitForm - use this to create/update a record when using an Edit Form in your canvas app.
Patch - use this to create/update a record using data from any inputs not inside an Edit Form.
---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."
WarrenBelz
146,769
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
66,091
Most Valuable Professional