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
Super User

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
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (1,352)