cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ngreen
Resolver I
Resolver I

Visible condition based on selected dropdown value that gets values from a collection

So I've made visible conditions based on a dropdown selected value before, but I've never done a condition that involves a custom dropdown with values from a collection. The formula seems to be different, but I can't quite figure it out.

 

Collection is Roles with values View All, Administration, and Information.

 

I was trying to have a field visible only when View All is selected in the dropdown. This is the formula that I'm used to using:

 

If(Dropdown1.Selected.Value = "condition1", true, false)

 

But it seems to want to change it to If( Dropdown1.SelectedText = "condition1", true, false); however, it throws an error at the = and says invalid formula. Can anyone help me out with this?

1 ACCEPTED SOLUTION

Accepted Solutions
RandyHayes
Super User
Super User

@ngreen 

SelectedText is a deprecated property!  It would be nice if they removed it from the options that show up.

 

Anyway, your formula for the Visible property should simply be:

Dropdown1.Selected.Value = "condition1"

Or in your specific case:

Dropdown1.Selected.Value = "View All"

 

However, the specific use of .Value designates the column name of the table that is your Items property of the dropdown.  So, if you are still encountering an issue, please provide the Items property of Dropdown1.

 

I hope this is helpful for you.

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

2 REPLIES 2
RandyHayes
Super User
Super User

@ngreen 

SelectedText is a deprecated property!  It would be nice if they removed it from the options that show up.

 

Anyway, your formula for the Visible property should simply be:

Dropdown1.Selected.Value = "condition1"

Or in your specific case:

Dropdown1.Selected.Value = "View All"

 

However, the specific use of .Value designates the column name of the table that is your Items property of the dropdown.  So, if you are still encountering an issue, please provide the Items property of Dropdown1.

 

I hope this is helpful for you.

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

@RandyHayes 

 

Thank you for taking the time to assist me with this. I did try that earlier and still got the invalid formula error.

 

The Items property for my dropdown is Items = Roles.Name

 

That stemming from the OnStart property of ClearCollect(Roles, {Name:"View All"}, {Name:"Administration"}, {Name:"Information"});

 

Edit: Nevermind I did figure it out. I had to swap Value for Name. Your explanation about .Value designating the column is what clued me in. Thank you!

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (4,893)