cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted
Helper III
Helper III

Re: Display a dropdown only if items are available

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
Highlighted
Helper III
Helper III

Re: Display a dropdown only if items are available

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

Highlighted
Frequent Visitor

Re: Display a dropdown only if items are available

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

Highlighted
Helper III
Helper III

Re: Display a dropdown only if items are available

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
Ignite

Microsoft Ignite

This will be a conference that you do not want to miss!

secondImage

New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

August 2020 CYST Challenge

Check out the winners of the recent 'Can You Solve These?' community challenge!

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (5,048)