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

Community site session details

Session Id : ZzD6VNLE7FKQkf+T7D8pDU
Power Apps - Building Power Apps
Answered

Error message to display if box empty

Like (0) ShareShare
ReportReport
Posted on 1 Jun 2021 07:43:22 by 93

Hi there, 

 

I have several text input fields in my Canvas app that I don't want the user to be able to skip past when they are using the app.

 

I would like a message to display in red if they try to select the Next button (which has a Navigate to next page function on it) when the text input box is blank, and prevent them from moving on until this has been infilled.

 

Is there some code that I can copy and paste somewhere for this?

 

Thanks

Phil

I have the same question (0)
  • zmansuri Profile Picture
    6,048 Super User 2024 Season 1 on 01 Jun 2021 at 08:04:45
    Re: Error message to display if box empty

    a.jpg

    1.To display error message based on validation you can use this property on form. Just click on error message. Go to it's "Visible" property. And write your logic there.

    2. If you want to prevent them from moving on untill there is some data. Go to "Next" button's "Visisble" property and write logic like. "If!(IsBalnk(Datacarad1) &&if(!IsBlank(Datacarda2),true,false))".
    I can't give you the exact code before seeing all the details.

  • PhilGlew Profile Picture
    93 on 01 Jun 2021 at 10:22:20
    Re: Error message to display if box empty

    Thanks for the suggestions. 

     

    The Next button is called "Icon3_7" and the text input field is called "DescInput_Inputs_1".

     

    So I want it whereby, if DescInput_Inputs_1 is blank and the user clicks Icon3_7, a message displays saying "Please complete all required fields before continuing"...

     

    Thanks

     

    Phil 

  • Verified answer
    zmansuri Profile Picture
    6,048 Super User 2024 Season 1 on 01 Jun 2021 at 10:26:27
    Re: Error message to display if box empty

    Go to " Icon3_7" Visible property. Write

    If( !IsBlank(DescInput_Inputs_1),true,false).

    Your button will not be visible on screen untill there is some data in "DescInput_Inputs_1".

     

    To display message:

    Go to required property of "DescInput_Inputs_1 ". Make it "true".

    Then go to ErrorMessage of that card. And write whatever message you want to display.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 629 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 397 Super User 2025 Season 2

#3
wolenberg_ Profile Picture

wolenberg_ 232 Moderator

Last 30 days Overall leaderboard
Loading complete