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

Error Checking Patch Function

I am submitting data to a sharepoint list. How can I add error checking/validation to my OnSelect syntax, so that when a user submits information, it validates specific fields for conditions, such as field not nulll.

 

For example, I want to make sure TextInput1 is not emtpy. 

 

Patch('Data Source ',Defaults('Data Source'),{Sharepoint Column:TextInput1.Text})

4 REPLIES 4
Highlighted
Community Support
Community Support

Re: Error Checking Patch Function

Hi @dmarin,

 

I think you would have interests reading the following blog:

A few Best Practices in Data Validation

we could take use of the Validate function to check whether the value of a single column or a complete record is valid for a data source.

For more information, see:

Validate function in PowerApps

Suggestions here should be add a another button to check if all the data required is inputted correctly, with the Onselect Property configrued with the Validate function.

 

Post back if you have any further questions.

Regards,

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Helper II
Helper II

Re: Error Checking Patch Function

I did look at both but I am having trouble since I am not using SubmitFrom and I can't get the proper syntax in place for Validate funtions. 

 

Can you help me put together the right syntax. ? 

Highlighted
Anonymous
Not applicable

Re: Error Checking Patch Function

Hi dmarin,

Did you find the syntax of validate with patch ? 

Highlighted
Kudo Kingpin
Kudo Kingpin

Re: Error Checking Patch Function

there is a validate() function you can call before doing the patch.

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (6,717)