cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
DT69
Regular Visitor

How to navigate to 'No' screen if ALL equal 'No' or "Yes' screen if ANY equal 'Yes'?

I am fairly certain there is an easier way to do this... There is no table or collection here, just drop downs. We are hoping to advance to a specific screen if all dropdowns equal No or to a different screen if any of the response equal yes. This is what I have...

If('DropDown-DSS-3-Q4'.Selected.Value = "No", Navigate('DSS-5-RespondsNo',ScreenTransition.None)) Or If('DropDown-DSS-3-Q5'.Selected.Value = "No", Navigate('DSS-5-RespondsNo',ScreenTransition.None)) Or If('DropDown-DSS-3-Q6'.Selected.Value = "No", Navigate('DSS-5-RespondsNo',ScreenTransition.None)) Or If('DropDown-DSS-3-Q7'.Selected.Value = "No", Navigate('DSS-5-RespondsNo',ScreenTransition.None)) Or If('DropDown-DSS-3-Q8'.Selected.Value = "No", Navigate('DSS-5-RespondsNo',ScreenTransition.None))

Seeking any tips or suggestions.

Thank you.

2 ACCEPTED SOLUTIONS

Accepted Solutions
WarrenBelz
Super User
Super User

Hi @DT69 

Try this 

If(
   'DropDown-DSS-3-Q4'.Selected.Value = "No", 
   Navigate('DSS-5-RespondsNo',ScreenTransition.None)
   'DropDown-DSS-3-Q5'.Selected.Value = "No", 
   Navigate('DSS-5-RespondsNo',ScreenTransition.None)
   'DropDown-DSS-3-Q6'.Selected.Value = "No", 
   Navigate('DSS-5-RespondsNo',ScreenTransition.None)
   'DropDown-DSS-3-Q7'.Selected.Value = "No", 
   Navigate('DSS-5-RespondsNo',ScreenTransition.None)
   'DropDown-DSS-3-Q8'.Selected.Value = "No", 
   Navigate('DSS-5-RespondsNo',ScreenTransition.None)
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

 

View solution in original post

wyotim
Resident Rockstar
Resident Rockstar

Hi @DT69, maybe try this:

 

If(
    'DropDown-DSS-3-Q4'.Selected.Value = "No" && 'DropDown-DSS-3-Q5'.Selected.Value = "No" && 'DropDown-DSS-3-Q6'.Selected.Value = "No" && 'DropDown-DSS-3-Q7'.Selected.Value = "No" && 'DropDown-DSS-3-Q8'.Selected.Value = "No", 
    Navigate('DSS-5-RespondsNo', ScreenTransition.None),
    Navigate('DSS-4-RespondsYes', ScreenTransition.None)
)

 

It's not pretty but it should get the job done!

I think the issue with the previous suggestion is that if, for example, 'DropDown-DSS-3-Q4'.Selected.Value = "No" it will navigate to 'DSS-5-RespondsNo' even if 'DropDown-DSS-3-Q5'.Selected.Value = "Yes" because it doesn't check the other values before navigating. Reversing the conditions for that suggestion would probably work as it only needs one "Yes" to navigate to the other screen. So:

If(
    'DropDown-DSS-3-Q4'.Selected.Value = "Yes", 
    Navigate('DSS-4-RespondsYes', ScreenTransition.None),
    'DropDown-DSS-3-Q5'.Selected.Value = "Yes", 
    Navigate('DSS-4-RespondsYes', ScreenTransition.None),
    'DropDown-DSS-3-Q6'.Selected.Value = "Yes", 
    Navigate('DSS-4-RespondsYes', ScreenTransition.None),
    'DropDown-DSS-3-Q7'.Selected.Value = "Yes", 
    Navigate('DSS-4-RespondsYes', ScreenTransition.None),
    'DropDown-DSS-3-Q8'.Selected.Value = "Yes",
    Navigate('DSS-4-RespondsYes', ScreenTransition.None), 
    Navigate('DSS-5-RespondsNo', ScreenTransition.None)
)

 
Feel free to let me know if that works for you or not! I'm happy to follow up if needed!

View solution in original post

6 REPLIES 6
WarrenBelz
Super User
Super User

Hi @DT69 

Try this 

If(
   'DropDown-DSS-3-Q4'.Selected.Value = "No", 
   Navigate('DSS-5-RespondsNo',ScreenTransition.None)
   'DropDown-DSS-3-Q5'.Selected.Value = "No", 
   Navigate('DSS-5-RespondsNo',ScreenTransition.None)
   'DropDown-DSS-3-Q6'.Selected.Value = "No", 
   Navigate('DSS-5-RespondsNo',ScreenTransition.None)
   'DropDown-DSS-3-Q7'.Selected.Value = "No", 
   Navigate('DSS-5-RespondsNo',ScreenTransition.None)
   'DropDown-DSS-3-Q8'.Selected.Value = "No", 
   Navigate('DSS-5-RespondsNo',ScreenTransition.None)
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

 

The suggested formula did not work for me. Also, I failed to mention that if ANY of the four dropdowns equal 'Yes', the 'icon' control should navigate to 'DSS-4-RespondsYes'.  

Thank you.

DT69
Regular Visitor

@WarrenBelz I renamed the dropdowns, after I update the formula with the new names it worked, mostly. It will only navigate to the 'No' page even when one dropdown is set to yes... Here's the updated formula:

If(
'DropDown-DSS-3-Q4'.Selected.Value = "No", Navigate('DSS-5-RespondsNo',ScreenTransition.None),
'DropDown-DSS-3-Q5'.Selected.Value = "No", Navigate('DSS-5-RespondsNo',ScreenTransition.None),
'DropDown-DSS-3-Q6'.Selected.Value = "No", Navigate('DSS-5-RespondsNo',ScreenTransition.None),
'DropDown-DSS-3-Q7'.Selected.Value = "No", Navigate('DSS-5-RespondsNo',ScreenTransition.None),
'DropDown-DSS-3-Q8'.Selected.Value = "No", Navigate('DSS-5-RespondsNo',ScreenTransition.None),[Navigate('DSS-4-RespondsYes')]
)

Thank you,

wyotim
Resident Rockstar
Resident Rockstar

Hi @DT69, maybe try this:

 

If(
    'DropDown-DSS-3-Q4'.Selected.Value = "No" && 'DropDown-DSS-3-Q5'.Selected.Value = "No" && 'DropDown-DSS-3-Q6'.Selected.Value = "No" && 'DropDown-DSS-3-Q7'.Selected.Value = "No" && 'DropDown-DSS-3-Q8'.Selected.Value = "No", 
    Navigate('DSS-5-RespondsNo', ScreenTransition.None),
    Navigate('DSS-4-RespondsYes', ScreenTransition.None)
)

 

It's not pretty but it should get the job done!

I think the issue with the previous suggestion is that if, for example, 'DropDown-DSS-3-Q4'.Selected.Value = "No" it will navigate to 'DSS-5-RespondsNo' even if 'DropDown-DSS-3-Q5'.Selected.Value = "Yes" because it doesn't check the other values before navigating. Reversing the conditions for that suggestion would probably work as it only needs one "Yes" to navigate to the other screen. So:

If(
    'DropDown-DSS-3-Q4'.Selected.Value = "Yes", 
    Navigate('DSS-4-RespondsYes', ScreenTransition.None),
    'DropDown-DSS-3-Q5'.Selected.Value = "Yes", 
    Navigate('DSS-4-RespondsYes', ScreenTransition.None),
    'DropDown-DSS-3-Q6'.Selected.Value = "Yes", 
    Navigate('DSS-4-RespondsYes', ScreenTransition.None),
    'DropDown-DSS-3-Q7'.Selected.Value = "Yes", 
    Navigate('DSS-4-RespondsYes', ScreenTransition.None),
    'DropDown-DSS-3-Q8'.Selected.Value = "Yes",
    Navigate('DSS-4-RespondsYes', ScreenTransition.None), 
    Navigate('DSS-5-RespondsNo', ScreenTransition.None)
)

 
Feel free to let me know if that works for you or not! I'm happy to follow up if needed!

DT69
Regular Visitor

That did it ! Thank you!

Thank you both @WarrenBelz and @wyotim for your time and genius! 

Hi @DT69 ,

I try to check my feed hourly and just got back to this. My approach would have been similar to @wyotim .

You have the option of accepting more than one solution - entirely up to you.

Helpful resources

Announcements
Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Users online (1,286)