cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Frequent Visitor

Display a dropdown only if items are available

Hello together,

 

I've got a question regarding AllowedValues-Fields:

I have an AllowedValues-Dropdown. It has the Items Property "Filter('Streams & Products'; Product = DataCardValue5.Selected.Result)" which allows me to show the respective Roles for a Product.

Sometimes there are no special roles for a product so in that case, I want to hide my dropdown field. How can I do this?

I tried IsEmpty(DataCardValue5.Items) and I tried IsEmpty('Special Role_DataCard2'.AllowedValues)

[Special Role_DataCard2 is the respective DataCard to my dropdown]

Has anyone of you don this before or has an idea how to do it?

 

TL;DR: How can I hide a dropdown-field when it has no items to select?

 

Thanks for your support 🙂

 

Moritz

1 ACCEPTED SOLUTION

Accepted Solutions
Helper IV
Helper IV

I did something similar by taking the values you want in the dropdown and adding it to a variable beforehand. THen use IfBlank and IsEmpty for the variable to make the visible property either true or false. 

 

Worked fine for me.

View solution in original post

3 REPLIES 3
Helper IV
Helper IV

I did something similar by taking the values you want in the dropdown and adding it to a variable beforehand. THen use IfBlank and IsEmpty for the variable to make the visible property either true or false. 

 

Worked fine for me.

View solution in original post

Frequent Visitor

Okay, how exactly did you do it? Did you add the Filter(...)-formula to a variable or how exactly did you do it?

I use a previously selected dropdown's onchange property with the following code:

Set(ListOfAssemblies;Filter(Var1;Column.Value=Var2).Title)

So you  can filter the collection/list/table and insert the output into a variable

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Top Solution Authors
Top Kudoed Authors
Users online (74,714)