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 / Next Icon DisplayMode:...
Power Apps
Answered

Next Icon DisplayMode: Disable until "Other" fields are filled out

(0) ShareShare
ReportReport
Posted on by

@RandyHayes 

 

Hi Randy,

 

I have a DisplayMode question. I want to disable my Next icon until "Other" fields are filled in. My current DisplayMode formula for the Next icon is:

Coalesce(If(frmPayment.Valid || valOtherShipMethod.Visible && IsBlank(valOtherShipMethod.Text) || valCustAcctNumber.Visible && IsBlank(valCustAcctNumber.Text),DisplayMode.Edit,DisplayMode.Disabled))

I'm not sure how to write an AND/OR statement. Just because someone chose an Other Ship Method doesn't mean they are also going to be indicating that the customer is paying and thus filling in an account number. FYI- I'm either going to hide the Payment field or make it read-only if the Shipping Crew tells me that a Customer Payer is always equivalent to Collect which I'm guessing it is. If you look below the screenshot you will see the formulas associated with the 2 data cards in question.

OtherFieldsSS.png

 

OTHER SHIP METHOD DATA CARD
Text input Properties:
Default: Parent.Default
Fill: Coalesce(If(valOtherShipMethod.Visible && IsBlank(valOtherShipMethod.Text), MistyRose,White))

 

Data Card Properties:
Visible: ddShipMethod.Selected.Value="Other"
Required: false
Default: ThisItem.'Other Ship Method'
Update: valOtherShipMethod.Text
ErrorMessage Text: Coalesce(Parent.Error, If(valOtherShipMethod.Visible && IsBlank(valOtherShipMethod.Text),"Enter Preferred Carrier"))

 

CUSTOMER ACCOUNT NUMBER DATA CARD
Text Input Properties:
Default: Parent.Default
Fill: If(IsBlank(valCustAcctNumber.Text), MistyRose,White)

 

Data Card Properties:
Visible: ddPayer.Selected.Value<>"CSO"
Required: false
Default: ThisItem.'Customer Account Number'
Update: valCustAcctNumber.Text
ErrorMessage Text: Coalesce(Parent.Error, If(valCustAcctNumber.Visible && IsBlank(valCustAcctNumber.Text),"Enter Shipping Account Number"))

 

Thanks in advance for your help. Let me know if you have any questions. 

 

Kind regards,

Teresa

Categories:
I have the same question (0)
  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @tagustin2020 

    The Coalesce in your formula is meaningless as there is nothing to coalesce!  In fact, looking at your other formulas, you are over-coalescing a lot.  Ex. Coalesce(If(valOtherShipMethod.Visible && IsBlank(valOtherShipMethod.Text), MistyRose,White)) - the Coalesce has only one argument, so it is not meaningful.  The rest seem fine.

     

    I believe your form is split at this stage, so you will not really have the luxury of using the .Valid property in your statement.  If that is not correct, then you can use it.  Otherwise, if there are other sub-forms to this form, or non-visible fields that will become visible at stages, then you will not be able to.

     

    What I am not corelating in your post is which control is which from the picture.  You provided great information about all the properties, but not what the control names are. 

     

    In general, you just want to get to a statement that evaluates to true if the form can be advanced.  And sometimes, you can even just write it out using "normal speak" or's and and's and then convert to Boolean and insert the control names.

     

    I'd give you more of a "here's your formula", but I hesitate because I am not sure of the control names.

     

    I'm slipping away for the evening here, so, feel free to respond back, but I might not get back to it until tomorrow.

     

     

  • tagustin2020 Profile Picture
    on at

    @RandyHayes 

     

    Hi Randy,

     

    Since each screen has it's own form, .valid is actually working for the most part. If you scroll down, you'll see an example with the Recipient screen. The challenge comes in with the "Other" and "Customer" account fields because I don't want to make them mandatory unless they actually need to be filled in. 

     

    I see what you mean about not needing Coalesce. The following formulas seem to work just fine.

     

    I changed the ErrorMessage Text property for the Other Shipment Method to:

    If(valOtherShipMethod.Visible && IsBlank(valOtherShipMethod.Text),"Enter Preferred Carrier")

     

    I changed the ErrorMessage Text property for the Customer Account Number to:

    If(valCustAcctNumber.Visible && IsBlank(valCustAcctNumber.Text),"Enter Shipping Account Number")

     

    Does that look better, sensei?

    Morita.png

     

    I think just having the Other Shipment Method and Customer Account Number fields highlighted will help reinforce to the user that they need to fill them in. If they don't, the Shipping Crew will contact them, but I think the users will get that they need to fill them in if they want their items to be shipped on time. Let me know if you disagree and think I should keep trying to lock down the form more.

     

    Here is an example of where the .Valid is working fine to prevent the user from moving on to the next screen until the required fields are filled in. The DisplayMode property is: 

     

    If(frmRecipient.Valid,DisplayMode.Edit,DisplayMode.Disabled)

     

    RecipientSS.png

     

    In regards to your controls question, were you just wondering what the form and nav icon control names for the Payment screen were? The form control is frmPayment. The Next icon is iconNextPS.

     

    Thanks Randy,

    Teresa

     

  • Verified answer
    RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @tagustin2020 

    This is that point between functionality and purpose.  Meaning, if the purpose of a PowerApp is to make processes more efficient, then would allowing the user to omit information in order for them to then have to go through some interchange with some other person/department to complete information be efficient?  I would say no.  Users would say, "but I don't want to fill it all in, I just want to put in what I know and go."  Which is a short-sightedness of a user (because they never factor in the ensuing delays and collaboration to come).

    Anyway...different story for different day.

     

    When I was referring to what were the control names, I was trying to put together the logic you needed for your displaymode.  Now, you actually have another option, which is, to not duplicate your logic.  Since you are setting error messages when conditions warrant it, then you can really just have your display mode look at the error message labels. If any of them are not blank, then your display mode should be Disabled.  That is the simple and easy way, since again, you've already put the logic into the Text properties of the labels.

     

    Is that clear and helpful - gakusei?  😉

    Are you able to work out the formula for that DisplayMode with this concept or are there some additional factors?

  • tagustin2020 Profile Picture
    on at

    @RandyHayes 

     

    Hi Randy,

     

    Thank you for the good advice. I'll take it. I entered the following formula into the DisplayMode of the Next button and it seems to be working. I tried it with and without Coalesce and it only worked properly with Coalesce. Let me know if you see anything amiss with my logic.

     

    Coalesce(If(frmPayment.Valid && (IsBlankOrError(ErrorMessageOSM.Text) && IsBlankOrError(ErrorMessageCAN.Text)),DisplayMode.Edit,DisplayMode.Disabled))

     

     

     

    DisplayModeFixSS.png

     

    Thanks so much for all your help this weekend. You are a lifesaver!

    Teresa

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @tagustin2020 

    That looks good!

    Other than you don't need the IsBlankOrError, you just need IsBlank, it is all fine.  Not that the IsBlankOrError will not work, just that (in that formula) it is 14 more characters typed than you need.  You know how I am about the least amount of typing 😁

  • tagustin2020 Profile Picture
    on at

    @RandyHayes 

     

    Thanks for the feedback Randy. With further testing, I realized the Next button won't light up when the form is set to the default entries of UPS Ground, CSO, Prepaid. This is starting to drive me a little bonkers. Does setting DefaultSelectedItems mess up the .Valid property? If so, how do I account for this? Thanks! Teresa

     

    DefaultPaymentSS.png

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 551

#2
WarrenBelz Profile Picture

WarrenBelz 430 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 298

Last 30 days Overall leaderboard