cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
MKWIN
Level: Powered On

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 Smiley Happy

 

Moritz

1 ACCEPTED SOLUTION

Accepted Solutions
gmaasz
Level: Powered On

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.

3 REPLIES 3
gmaasz
Level: Powered On

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.

MKWIN
Level: Powered On

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?

gmaasz
Level: Powered On

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
firstImage

PowerApps Monthly Community Call!

Join us next Wednesday for our Demo Extravaganza, October 16, 2019 8am PDT.

firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Top Kudoed Authors
Users Online
Currently online: 202 members 4,049 guests
Please welcome our newest community members: