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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Patch - Mandatory Fields
Power Apps
Unanswered

Patch - Mandatory Fields

(0) ShareShare
ReportReport
Posted on by 66

Hi guys

 

I'm using a patch function to write back data to my SP list, but my users are leaving two of my fields blank. 

I have two fields that I really need them to fill out. How can I make them mandatory with my patch function? 

 

One is a text input field and the other is just a label from a search box. 

 

So, in a sense what I have now is: I've bolded the two that I need mandatory. 

If not filled out, I could use the Notify Function...but I can't get it to work. 

 

Patch(
NewSSTData,
Defaults(NewSSTData),
{Title: VP_Var.Text,
TM_Name:ManagerName.Text,
TM_Email:ManagerEmail.Text,
Specialist_Name:CSSName.Text,
Chat_ID:ChatIDLabel.Text,
});

Categories:
I have the same question (0)
  • RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @smartin 

    Take a look over my video on Input Form Validation.  It should give you some great ideas on how to solve this.

    Check it out and let me know if you have any questions.

     

    I hope this is helpful for you.

  • smartin Profile Picture
    66 on at

    Thanks, Randy but I'm not using a Form just because it constrained my layout of the cards. 

  • RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @smartin 

    The video covers both EditForms and do-it-yourself forms.  Sorry there is no table of contents on that video to jump to it, but it is the second part.  

    Also, EditForms are awesome to use.  Yes, layout is constraining.  I have another video - long one (with table of contents to skip around) that covers how to use EditForms without any constraint (and pretty much anything you ever wanted to know about edit forms).  May be interesting for you to view as well.

     

     

  • smartin Profile Picture
    66 on at

    Thanks Randy but I think I've approached it a different way than how your video has it laid out. 

     

    I feel like I'm close with something like. My problem is that it only recognizes one of the if functions and not both

     

    If(!IsBlank(PersonVar),

    If(!IsBlank(Label.Text,),

     

    Patch(
    NewSSTData,
    Defaults(NewSSTData),
    {Title: VP_Var.Text,
    TM_Name:ManagerName.Text,
    TM_Email:ManagerEmail.Text,
    Specialist_Name:CSSName.Text,
    Chat_ID:ChatIDLabel.Text,
    }), Notify))

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard