cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
scnative
Helper II
Helper II

SharePoint "Customize List" with Patch - Issues with Save and Required Fields

I'm working on a Power App that someone else set up.  SharePoint list is the data source.  Patch function used. 

 

SharePoint Integration OnSave = 

 

If(
MainForm.Mode = New,
Set(varFlag,"1");
Patch(
'Project and Initiatives Control',
Defaults('Project and Initiatives Control'),
MainForm.Updates,
AddInfoForm.Updates,
StatusForm.Updates
),
Set(varFlag,"1");
Patch(
'Project and Initiatives Control',
{ID: SharePointIntegration.SelectedListItemID},
MainForm.Updates,
AddInfoForm.Updates,
StatusForm.Updates
)
);

 

With this set as-is, it shows errors for Required fields that are empty.  But, when click Save, the screen remains and doesn't close or go back to the list. 

 

If I add RequestHide() it saves and closes, but doesn't present errors for Required fields. 

 

How to fix?  Need to keep Patch, but also need errors for required fields and need the form to close/go back to list. 

 

TIA!

10 REPLIES 10

@WarrenBelz  Understood.  The person who created this uses Patch because without, the Flow won't work properly that captures comments and posts them in a roll up on the form for all to see.  The Var is set in SharePoint Integration that Flow uses.  

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.

Super User 2 - 2022 Congratulations

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Users online (3,793)