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 Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

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.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (2,422)