cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Batrisyia_
Helper I
Helper I

Disable Dropdown

Hi everyone,

 

I'm creating an app for material selection and I'm new with powerapps. For my apps, I'm using cascading dropdowns to filter the data accordingly. Im thinking of how to disable the dropdown when there are no options and enable when there are options.

 

Also, is there any way to arrange ranking of material (from cheapest to expensive material).

 

First pic: 'Type of coolant' dropdown should disable as it doesn't have options

Second pic: 'Sub system' dropdown is available for user to select

 

Batrisyia__0-1603341233305.png 

 

Batrisyia__1-1603341377264.png

 

Thank you.

1 ACCEPTED SOLUTION

Accepted Solutions

@Batrisyia_ we can try another way:

 

If( CountRows(
Distinct(Mastercopy_1,INDUSTRY)
))=0, DisplayMode.Disabled,DisplayMode.Edit)

View solution in original post

4 REPLIES 4
gabibalaban
Super User II
Super User II

Hi @Batrisyia_ ,

 

1. For the first issue, please use in the DisplayMode property of the dropdown something silimar to:

     If(IsEmpty(YourDropdowItemsFormula),

                                 DisplayMode.Disabled,

                                  DisplayMode.Edit)

 

2. For the second, use a Sort function in Items property of the dropdown:

     Sort(YourDataForDropdown, Price,Asecending) 

 

Hope it helps !

Dear @gabibalaban ,

Based on what you have given, I have tried the coding, unfortunately it also disabled when it has value.

Correct me if there are any error in the coding below,

If( IsEmpty(
Distinct(Mastercopy_1,INDUSTRY)
), DisplayMode.Disabled,DisplayMode.Edit)

@Batrisyia_ we can try another way:

 

If( CountRows(
Distinct(Mastercopy_1,INDUSTRY)
))=0, DisplayMode.Disabled,DisplayMode.Edit)

View solution in original post

got it! Somehow I change the CountRows = 1. 

 

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (71,498)