web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Remove error notificat...
Power Apps
Answered

Remove error notification if data is blank in Patch if people picker

(0) ShareShare
ReportReport
Posted on by 428

Hi All i am writing below formula to patch people picker column however when it goes blank it show error notification in PowerApps everything works fine but i don't want to show error notification .

Any ways to get remove error notification if not then how i can write condition in patch that if it people picker is blank perform nothing 

Set(
 varloaderReq,
 true
);
UpdateContext({vartimer: true});
If(
 !Form3.Valid,
// Then
 SubmitForm(Form3),
 
// Else
 Patch(
 POAMaster,
 {ID: VarID},
 {
 NextAction: {
 '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
 Claims: "i:0#.f|membership|" & DataCardValue77.Selected.Email,
 Department: "",
 DisplayName: DataCardValue77.Selected.DisplayName,
 Email: DataCardValue77.Selected.Email,
 JobTitle: "",
 Picture: ""
 }
 }
 );
 Patch(
 POAMaster,
 {ID: VarID},
 Form3.Updates
 );
 Set(
 varloaderReq,
 false
 );
 Navigate(
 MyItems,
 ScreenTransition.None
 )
);

 

Categories:
I have the same question (0)
  • Verified answer
    v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @Ashok2 :

    I suggest you add a judgment condition, when the personnel selector is empty, the related patch is not executed. This should avoid errors.

    Maybe you could try:

    Set(varloaderReq,true);
    UpdateContext({vartimer: true});
    If(
     !Form3.Valid,
    // Case1
     SubmitForm(Form3),
     !IsBlank(DataCardValue77.Selected),
    // Case2
     Patch(
     POAMaster,
     {ID: VarID},
     {
     NextAction: {
     '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
     Claims: "i:0#.f|membership|" & DataCardValue77.Selected.Email,
     Department: "",
     DisplayName: DataCardValue77.Selected.DisplayName,
     Email: DataCardValue77.Selected.Email,
     JobTitle: "",
     Picture: ""
     }
     }
     );
     Patch(POAMaster,{ID: VarID},Form3.Updates);
     Set(varloaderReq,false);
     Navigate(MyItems,ScreenTransition.None),
    //Case3
     Patch(POAMaster,{ID: VarID},Form3.Updates);
     Set(varloaderReq,false);
     Navigate(MyItems,ScreenTransition.None)
    );

    Best Regards,

    Bof

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 342 Most Valuable Professional

#2
11manish Profile Picture

11manish 234

#3
Valantis Profile Picture

Valantis 187

Last 30 days Overall leaderboard