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

Patch - Mandatory Fields

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,
});

4 REPLIES 4
Super User III
Super User III

@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.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

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

Super User III
Super User III

@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.

 

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

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))

Helpful resources

Announcements
secondImage

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

Top Kudoed Authors
Users online (87,141)