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

secondImage

Demo Extravaganza Winner Announcement

Please join us on Wednesday, July 21st at 8a PDT. We will be announcing the Winners of the Demo Extravaganza!

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

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.

Top Solution Authors
Top Kudoed Authors
Users online (1,999)