Power app IF statement
-
20-02-2021 - |
Question
I am using a Power Apps If statement.
I have four questions that must be answered "YES" in order to proceed to the next screen.
If any of them is answered "NO", then navigates to a different screen.
Using following syntax:
If(Dropdown2.Selected.Value="YES" ,
Dropdown2_1.Selected.Value= "YES",
Dropdown2_2.Selected.Value= "YES",
Dropdown2_2.Selected.Value= "YES",
Navigate(Screen1, ScreenTransition.Fade), Navigate(Screen1_2))
Where am I going wrong?
Solution
Try using this:
If(And(Dropdown2.Selected.Value = "YES", Dropdown2_1.Selected.Value = "YES", Dropdown2_2.Selected.Value = "YES", Dropdown2_3.Selected.Value = "YES"), Navigate(YesScreen, ScreenTransition.Fade), Navigate(NoScreen, ScreenTransition.Fade))
OR
If(Or(Dropdown2.Selected.Value = "NO", Dropdown2_1.Selected.Value = "NO", Dropdown2_2.Selected.Value = "NO", Dropdown2_3.Selected.Value = "NO"), Navigate(NoScreen, ScreenTransition.Fade), Navigate(YesScreen, ScreenTransition.Fade))
Change the name of controls, NoScreen
& YesScreen
with actual name of controls & screens in your app.
Microsoft documentations:
Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange