cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

How to change the OOTB mandatory fields validations messages

Hi,

 

I have few SharePoint Columns in SharePoint list and these are mandatory in SP list. I customized my list using PowerApps. I want to change the OOTB validations message on Saving new items in list. If I kept mandatory items blank only OOTB messages coming as required field validator. I tried using DataCards -> ErrorMessage but these are always visible on UX. Please suggest.

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @Anonymous ,

Do you only want the ErrorMessage Label to display the error message?

 

Based on the needs that you mentioned, I have made a test on my side, pleasse take a try with the following workaround:

1. Unlock the Required Filed data cards within your Edit form, then set the Text property of the ErrorMessage Label to following:

"Please Type a Valid value for Required Title Column"      /* <-- Specify your custom error message here */

3.JPG

 

2. Set the Visible proeprty of the ErrorMessage Label to following:

If(IsBlank(Parent.Error), false, true)

4.JPG

Please consider take a try with above solution, then check if the issue is solved.

 

When you add a new item without filling the Required fields, the custom error message would show up as below:5.JPG

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
Community Support
Community Support

Hi @Anonymous ,

Could you please share a bit more about your scenario?

Do you want to change the validation message within the Edit form when you save the form data?

 

Based on the needs that you mentioned, I think the combination of If function and Notify function could achieve your needs. I have made a test on my side, please take a try with the following workaround:

Set the OnSave proeprty of the SharePointIntegration control to following:

If(
    IsBlank(DataCardValue1.Text),   /* <-- DataCardValue1 represents the Text Input box within the Title Data card in my Edit form */
    Notify("Please Type A Valid Value For The Required Title Field", NotificationType.Error),
    IsBlank(DataCardValue2.Text),   /* <-- DataCardValue2 represents the Text Input box within the TaskName Data card in my Edit form */
    Notify("Please Type A Valid Value For The Required TaskName Field", NotificationType.Error),
    SubmitForm(SharePointForm1)
)

On your side, you may type following:

If(
    IsBlank(DataCardValue1.Text),   /* <-- DataCardValue1 represents the Text Input box within the Column1 Data card in my Edit form */
    Notify("Please Type A Valid Value For The Required Column1 Field", NotificationType.Error),
    IsBlank(DataCardValue2.Text),   /* <-- DataCardValue2 represents the Text Input box within the Column2 Data card in my Edit form */
    Notify("Please Type A Valid Value For The Required Column2 Field", NotificationType.Error),
IsBlank(DataCardValue3.Text), /* <-- DataCardValue3 represents the Text Input box within the Column3 Data card in my Edit form */
Notify("Please Type A Valid Value For The Required Column3 Field", NotificationType.Error),
...
... SubmitForm(SharePointForm1) )   

2.JPG

 

Please chck the following GIF screenshot for more details:Test.gif

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Thanks @v-xida-msft  for the explanation. But I want a label message below all required fields at once not one by one in notifation bar. Please suggest. 

Hi @Anonymous ,

Do you only want the ErrorMessage Label to display the error message?

 

Based on the needs that you mentioned, I have made a test on my side, pleasse take a try with the following workaround:

1. Unlock the Required Filed data cards within your Edit form, then set the Text property of the ErrorMessage Label to following:

"Please Type a Valid value for Required Title Column"      /* <-- Specify your custom error message here */

3.JPG

 

2. Set the Visible proeprty of the ErrorMessage Label to following:

If(IsBlank(Parent.Error), false, true)

4.JPG

Please consider take a try with above solution, then check if the issue is solved.

 

When you add a new item without filling the Required fields, the custom error message would show up as below:5.JPG

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Anonymous
Not applicable

Thanks @v-xida-msft it worked. Thanks for the support.

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

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

Top Solution Authors
Top Kudoed Authors
Users online (71,797)