Hi
I'm new to power apps and have been watching various videos on how to set up multiple forms to feedback to SharePoint.
The problem I am having is randomly the data entries are overriding each other in sharepint and I can't pinpoint if this is in edit mode or when saving. it always seems to be the previous entry I was in. I'm using the below formula for onsave. what am i doing wrong?
If(
Form1.Mode=FormMode.New,
Patch(
'AAT Apprentice Tracker',
Defaults('AAT Apprentice Tracker'),
Form1.Updates,
Form2.Updates,
Form3.Updates
),
Patch(
'AAT Apprentice Tracker',
{ID: SharePointIntegration.SelectedListItemID},
Form1.Updates,
Form2.Updates,
Form3.Updates
)
);RequestHide()
my on edit formula is EditForm(Form1);EditForm(Form2);EditForm(Form3).
If you are using form controls, you should be using SubmitForm() to save back to the list unless you have no other choice than to use Patch(). SubmitForm() offers more functionality, such as activating the OnSubmit & OnError properties of the form control.
Hope that helps,
Bryan
Hi,
i've used that before and had inconsistencies with the data saving across the three forms I have created. just tested it now on a new entry and the first two forms saved, but the third didnt. upon editing the entry the third form updated.
Am i missing something obvious?
I haven't tried handling three forms at once through a Sharepoint integration like that.
Does your UX always involve submitting all three forms together? If so, I would try putting SubmitForm(Form2) in the OnSuccess of Form1 and SubmitForm(Form3) in the OnSuccess of Form2. That gives you the ability to add a bit of troubleshooting code like a Notify(), Errors(), or variable change that could help nail down what's happening here. As well, ensuring the SubmitForm() calls operate sequentially will help avoid any backend errors that come up when accessing the same record at nearly the same time with two function calls.
Bryan
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
User | Count |
---|---|
204 | |
97 | |
60 | |
51 | |
46 |
User | Count |
---|---|
255 | |
158 | |
87 | |
79 | |
59 |