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 / Validations in PowerAp...
Power Apps
Answered

Validations in PowerApp form

(0) ShareShare
ReportReport
Posted on by 124

I am creating PowerApps form without using Edit Form control. I want to set up validations now in my form controls like textboxes, drop downs etc. What will be the best approach to create validations? I have one submit button which has multiple patch functions submitting to different SharePoint lists. Do i need to check validations in same function or any other way is also there? 

 

Also is there any way i can exit my submit button's functionality in between if a condition is satisfied, without executing further code?

Categories:
I have the same question (0)
  • Verified answer
    HenriDesmet59 Profile Picture
    295 on at

    Hello @uiit3155 ,

     

    A way to put validation in PowerApps is to use the BorderColor of your form control. Inside the bordercolor, you write the condition you want : 

     

    If(IsBlank(Self.Text),Red,Blue)

     

    Then in the parameter DisplayMode of your Submit Button, you can watch in an If condition if any of the field have a red border color : 

    If(textbox1.borderColor = Red || textbox2.borderColor = Red ||textbox3.borderColor = Red || ....,
    Disabled, Edit)

     

    So in your form control, you can have the formula you want to tell the user the value does not respect the validation, and after you just watch if the border color is red or not.

     

    Tell me if It helps you 🙂 

     

    Henri

  • uiit3155 Profile Picture
    124 on at

    @HenriDesmet59 is there any way i can exit my submit button's functionality in between if a condition is satisfied, without executing further code?

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @uiit3155 

    give this in submit button

    If(
    IsBlank(DataCardValue18.Selected.Value) ,
    Set(
    varHighLightHos,
    true
    ); Notify("Enter values"),

    Set(
    varHighLightHos,
    false
    );
    SubmitForm(Form1))

     

    and this in datacard border color

    If(varHighLightHos && IsBlank(DataCardValue18.Text),Color.Red,Parent.BorderColor)

     

    by this way when they click on submit button, then only the blank fields border color will change to red

  • HenriDesmet59 Profile Picture
    295 on at

    You mean trigger the button without clicking on It ? I don't think It's possible in PowerApps.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @HenriDesmet59

    need to click on the button, that time the border color of the blank fields change to red

    like blank fields focussed

     

  • uiit3155 Profile Picture
    124 on at

    Is it possible by any chance to show all the fields that are not filled by user in an alert with those field names?

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    keep a recatngle and set the visible property to true if any one field is blank

    inside the recatngel display the field names in a label

  • uiit3155 Profile Picture
    124 on at

    But how we will come to know which field name to show in that label when it is empty.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    either you can keep many labels each for corresponding fields, like if field1 is blank then show label1 or you can concatenate all field names in single label

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 July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 416 Most Valuable Professional

#2
11manish Profile Picture

11manish 205 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 128 Super User 2026 Season 2

Last 30 days Overall leaderboard