Search code examples
powerappspowerapps-canvaspowerapps-formula

Navigation button based on several PowerApps dropdown values


I am trying to set mandatory dropdowns to be selected in order to go to the next screen.

  • Next screen is called End
  • First dropdown is called type_4
  • Second dropdown is called type_3
  • Third dropdown is called type_2

Please note that the default value of the dropdowns is Select your answer (first choice of the dropdown).

This is the code that I used but it doesn't seem to go through:

If(
    IsBlank(type_4.Selected.Value), 
    IsBlank(type_3.Selected.Value), 
    IsBlank(type_2.Selected.Value),
    Notify("Fill all the fields to continue", NotificationType.Error),
    Navigate(End,ScreenTransition.Cover) )

Solution

  • If the default option for your dropdowns is 'Select your answer', then you can use the Or function (or the Or operator) to combine the conditions, in an expression similar to the one below:

    If(
        Or(
            type_4.Selected.Value = "Select your answer",
            type_3.Selected.Value = "Select your answer",
            type_2.Selected.Value = "Select your answer"),
        Notify("Fill all the fields to continue", NotificationType.Error),
        Navigate(End,ScreenTransition.Cover) )