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
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,530)