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
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (1,122)