cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
IPC_ahaas
Post Patron
Post Patron

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
Post Patron
Post Patron

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
Post Patron
Post Patron

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
Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Top Kudoed Authors
Users online (1,990)