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 / Capture boolean false ...
Power Apps
Unanswered

Capture boolean false for an error message and restricting the save button

(0) ShareShare
ReportReport
Posted on by

Hi Folks

I have an app I am hoping to build being a newby.

I have a list of questions with a toggle beside each one sitting as false with the colour red, and then green for true.

What I want to do is capture any false values and provide an error message to fill in a text box for each false value.

Once completed I can then allow the save and send button to work.

Where the toggles are all true, then the error message would not be required.

Cheers

Categories:
  • PowerAddict Profile Picture
    7,316 Most Valuable Professional on at

    Hi @Trisect 

     

    Without knowing the exact setup of your app, this may not be exactly what you need but hopefully will guide you enough to get you to your desired result. 

     

    If you have some error message that you want to display when a toggle is set to false, simply set the visibility of the label/text input control used for displaying the error to !Toggle1.Value

     

    To enable the save button when a certain condition is met like all text input controls have been filled out, you can simply set the DisplayMode property of the save button to be based on a condition. Something like this: If(conditionTrue, DisplayMode.Edit, DisplayMode.Disabled)

     

    Let me know if this helps. 

     

    ---
    If you like this reply, please give kudos (Thumbs Up). And if this solves your problem, please mark this reply as a solution by selecting Accept as Solution. This makes it easier for others to find answers to similar questions. 

     

    Thanks!

    Hardit Bhatia

    Microsoft Business Applications MVP

    Microsoft Certified Trainer MCT

    Blog | Twitter | LinkedIn | Facebook | YouTube  |  Email

  • Tirsect Profile Picture
    4 on at

    Hi Hardit

    Many thanks for your reply, greatly appreciated.

    I am building a take 5 risk assessment tool with the top of the first screen having (job number, name, location, task, date and business unit all required), I then have 24 questions related to the safety of workers and they will have to answer before moving on.

    Where they have all true values, they can enter the email and press the save and send button which I want the app to save to the database and also pdf into a table and send to the email they place into the app.

    Where they have any false values, they will be required to go to a second screen to enter the following (hazard type, hazard description and controls), they then have the option to include a photo. 

    Once completed they can press the save and send button.

    With the toggle buttons (I have formatted them in red for false and green for true, this is both a value and a visual prompt.

    I was thinking to use an IF statement to check all 24 values and where any are false then prompt the user to complete the hazard section.

    I need to drive the behaviour to complete the app correctly, as this will make a difference as to whether it is used properly.

    Your feedback is greatly appreciated.

    Cheers

    Trisect

  • Tirsect Profile Picture
    4 on at

    Hi Hardit

    I was able to disable to the save button using the code below, though it does not work on the drop down list.

    If(IsBlank(TextInputJobNo_1) || IsBlank(TextInputName_1) || IsBlank(TextInputLocation_1) || IsBlank(TextInputTask_1) || IsBlank(TextInputEmail),
    DisplayMode.Disabled,
    DisplayMode.Edit
    )

    Cheers

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
11manish Profile Picture

11manish 402 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 296 Most Valuable Professional

Last 30 days Overall leaderboard