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
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.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Changes to Ideas Coming

We are excited to announce a new way to share your ideas for Power Apps!

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