cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
IPC_ahaas
Responsive Resident
Responsive Resident

Patch and SubmitForm on One Button

I seem to be having an inconsistent issue.

 

I have a HomeScreen that has FormA which pulls from List1 that has employee info.

I have an EditScreen which has FormB and FormC (not visible).

When I click on an employee from FormA it goes to the EditScreen and populates both FormB and FormC.

FormB updates (Patch) List1 and FormC adds (SubmitForm) a new record to List2.

 

I have a single Submit button inside FormB with Patch(List1) and SubmitForm(FormC), where FormC has Datasource=List2.

 

It worked once or twice, but now only List1 is getting updated when I click Submit. List2 isn't getting a new record at all.

The reason I have two lists is because List1 is updating employee data where List2 is acting as an activity log.

1 ACCEPTED SOLUTION

Accepted Solutions
IPC_ahaas
Responsive Resident
Responsive Resident

I learned that Patch can also be used to create new records. I thought it was only for updating. It's working much better without SubmitForm.

View solution in original post

3 REPLIES 3
Silvester
Super User
Super User

Hi @IPC_ahaas , 
Try putting the "SubmitForm" code before the "Patch" and let's see.

Did you like my post? Please give it a thumbs up! Did I resolve your issue? Please click Accept as Solution to close the thread and so other members of the community can find it easily.
IPC_ahaas
Responsive Resident
Responsive Resident

I learned that Patch can also be used to create new records. I thought it was only for updating. It's working much better without SubmitForm.

Silvester
Super User
Super User

Indeed, you can use Patch to create a new record, you will need to reference all needed columns in order for it to work. Happy to know you got it working!
Kindly accept as a solution to close the thread. Thanks

Did you like my post? Please give it a thumbs up! Did I resolve your issue? Please click Accept as Solution to close the thread and so other members of the community can find it easily.

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Top Solution Authors
Top Kudoed Authors
Users online (3,335)