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

@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
Highlighted
Memorable Member
Memorable Member

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 !

Highlighted

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)

Highlighted

@Batrisyia_ we can try another way:

 

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

View solution in original post

Highlighted

got it! Somehow I change the CountRows = 1. 

 

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (9,666)