cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
chinda
Helper III
Helper III

Tabbed Forms - issue with conditional Visible function

Hello All,

 

Currently creating a power apps form, and I want certain questions on my current tab to be visible when a certain criteria is met. 

 

When my drop down box has the 'Yes' option selected, I want another question to appear on the page. Below is my current code (which has an error message):

varTabSelected=1;
DataCardValue37_1.Selected.Value="Yes";

What do I need to fix here? 

 

1 ACCEPTED SOLUTION

Accepted Solutions
BCBuizer
Super User
Super User

Hi @chinda ,

 

I see you got the hang of it 🙂 Indeed, that's the way to add a third option.



Did you like my post? Please give it a thumbs up! Did I resolve your issue? Please click Accept as Solution to close the topic and so other members of the community can find solutions more easily.

View solution in original post

5 REPLIES 5
BCBuizer
Super User
Super User

Hi @chinda ,

 

Combine the two conditions with an && operator (logical And):

 

varTabSelected=1 &&
DataCardValue37_1.Selected.Value="Yes";


Did you like my post? Please give it a thumbs up! Did I resolve your issue? Please click Accept as Solution to close the topic and so other members of the community can find solutions more easily.

Awesome! Do you know how I could use that logical And to combine the following formulas @BCBuizer  : 

varTabSelected=2
If(
Or(
DataCardValue23_1.Selected.Value = "Product",
DataCardValue23_1.Selected.Value = "Asset/Accelerator"),
true,false)

 

BCBuizer
Super User
Super User

Hi @chinda ,

 

Here you go:

varTabSelected=2 && (DataCardValue23_1.Selected.Value = "Product" ||
DataCardValue23_1.Selected.Value = "Asset/Accelerator")

 

Here I used the || operator and brackets to combine the second part of the conditions and merged them using the && operator again.

 

The If statement can be left out since the condition itself returns a boolean. 



Did you like my post? Please give it a thumbs up! Did I resolve your issue? Please click Accept as Solution to close the topic and so other members of the community can find solutions more easily.

Amazing, one last question on this @BCBuizer. For 3 options, would the formula change to: 

varTabSelected=2 && (DataCardValue23_1.Selected.Value = "Product" ||
DataCardValue23_1.Selected.Value = "Asset/Accelerator" || DataCardValue23_1 = "Birthday Cake")

  

BCBuizer
Super User
Super User

Hi @chinda ,

 

I see you got the hang of it 🙂 Indeed, that's the way to add a third option.



Did you like my post? Please give it a thumbs up! Did I resolve your issue? Please click Accept as Solution to close the topic and so other members of the community can find solutions more easily.

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Top Solution Authors
Top Kudoed Authors
Users online (1,363)