cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Sammy
Level: Powered On

How to get form questions to use branching/logic

I have a form that I created from a SharePoint list on PowerApps and I want to be able to use branching to only show some questions depending on the answer from a previous question. How do I make this possible?

 

In my example, if the user selectes Knowledge Base/The Store I want it to show the question below, but if they select any of the other two answers I want it to show the next questions after that.Power.png

2 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted
Super User
Super User

Re: How to get form questions to use branching/logic

Hi @Sammy

 

Here is one option for the form fields you want to appear/disappear: 

  • Click the form field (card) you want to appear/disappear
  • Set the .Visible property of the card to: 
  • If(
    <whtever_your_dropdown_is_named>.Selected.Value = "Knowledge Base/The Store",
    true,
    false)

This will hide the selected card unless the user chooses Knowledge Base/The Store from the previous dropdown. You will likely run into issues with the fields moving all over the place (aka chaos!). 

 

Study this resource and this post to develop a strategy for handling said chaos. While you're at the post, you might consider voting to have cards "locked" where users put them.

 

Take care

View solution in original post

Super User
Super User

Re: How to get form questions to use branching/logic

*Edit: A little late to the show!*

 

Maybe use the Visible field on each question to either show or hide based on which option is selected? Something along the lines of this:

 

If(
     DropdownName.Selected.Value = "Knowledge Base/The Store",
     true,
     false
)

For the other two options, maybe use an Or statement with the same structure for the related questions, assuming that the same questions apply to both of those selections. 

 

If(
     DropdownName.Selected.Value = "Banking Script Centre" || DropdownName.Selected.Value = "GI Call Guides",
     true,
     false

 

View solution in original post

7 REPLIES 7
Super User
Super User

Re: How to get form questions to use branching/logic

For each card you want to show or hide you need to change the Visible property. Use an If and only make it visible when you want to show it. Then trigger it as you go. In this video I did exactly this but for a different reason if you are struggling with how that works. 

Shane - Microsoft MVP, YouTube, and PowerApps Consulting for when you are in a bind to get this fixed quickly. And finally we now have PowerApps Training
Highlighted
Super User
Super User

Re: How to get form questions to use branching/logic

Hi @Sammy

 

Here is one option for the form fields you want to appear/disappear: 

  • Click the form field (card) you want to appear/disappear
  • Set the .Visible property of the card to: 
  • If(
    <whtever_your_dropdown_is_named>.Selected.Value = "Knowledge Base/The Store",
    true,
    false)

This will hide the selected card unless the user chooses Knowledge Base/The Store from the previous dropdown. You will likely run into issues with the fields moving all over the place (aka chaos!). 

 

Study this resource and this post to develop a strategy for handling said chaos. While you're at the post, you might consider voting to have cards "locked" where users put them.

 

Take care

View solution in original post

Super User
Super User

Re: How to get form questions to use branching/logic

*Edit: A little late to the show!*

 

Maybe use the Visible field on each question to either show or hide based on which option is selected? Something along the lines of this:

 

If(
     DropdownName.Selected.Value = "Knowledge Base/The Store",
     true,
     false
)

For the other two options, maybe use an Or statement with the same structure for the related questions, assuming that the same questions apply to both of those selections. 

 

If(
     DropdownName.Selected.Value = "Banking Script Centre" || DropdownName.Selected.Value = "GI Call Guides",
     true,
     false

 

View solution in original post

Sammy
Level: Powered On

Re: How to get form questions to use branching/logic

Thanks for everyones reply. I have tried this approach but I am still having issues. When I tried to put the string in, it gave me an error message so I took out "Selected" and just kept .Value in. This took away the error message but the visibility is not working the way it should. When I have selected the option "Knowledge Base/The Store" I should get a question directly below it called "Page on the Knowledge Base/The Store referred to" which is where I have put the visibility property in.

 

See screenshots:

 

Power.pngPower1.png

Sammy
Level: Powered On

Re: How to get form questions to use branching/logic

Please ignore this previous reply from me. My error was I was using the car name rather than the dropdown name. When I changed it to the dropdown name it worked.

 

Thanks everyone!

JenniferC
Level: Powered On

Re: How to get form questions to use branching/logic

I have the the visibility portion down but what if I want it to "go to"? For instance, If Option C is selected, go to DataCard3.

mbrocchi
Level: Powered On

Re: How to get form questions to use branching/logic

Lots of great answers already to this question. I thought I would just add for anyone who prefers to watch a video tutorial on the subject, I recently posted something that explains how to do this in its basic form. 

 

https://youtu.be/PoKDvUaqn-k

 

Hope this helps anyone who is struggling with this concept.

Helpful resources

Announcements
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (4,981)