Search code examples
powerbipowerappspowerapps-canvaspowerapps-formula

Navigation button based on a PowerApps dropdown value


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

  • Next screen is called End
  • Dropdown is called type_4

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

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

This issue is specific to dropdown inputs. If it was a text field all I do is replacing Selected.Value by Text and it works fine. Dropdowns are my only problem so far.

EDIT: The default value of the dropdowns is Select your answer (first choice of the dropdown).


Solution

  • If the default option for your dropdown is 'Select your answer', then you can use an expression similar to the one below:

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