cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Wedlib
Advocate II
Advocate II

dropdown visibility condition if another dropdown items is empty or not

Hi

I have this dropdown1 that performs a filter for items. sometimes it returns no items:

Dropdown1

Items = Filter(View_Class, dpSectionName.Selected.id_Section = FK_id_Section)

 

I do like to make Dropdown2 only visible if Dropdown1[items] has values.

Right now I'm repeating the filter on [Visible] for dropdown2:

Visible = !IsEmpty(FilterView_Class,dpSectionName.Selected.id_Section = FK_id_Section)

 

I'm trying to optimize the performance of my code so I don't want to call the data source again.

There is nothing like checking if a dropdown1.items is empty ?? I cant find it

1 ACCEPTED SOLUTION

Accepted Solutions
StalinPonnusamy
Super User
Super User

Hi @Wedlib 

 

Set the visible property of the Dropdown2 to

!IsBlank(dpSectionName.Selected.id_Section)

 
Thanks,
Stalin - Learn To Illuminate

View solution in original post

2 REPLIES 2
StalinPonnusamy
Super User
Super User

Hi @Wedlib 

 

Set the visible property of the Dropdown2 to

!IsBlank(dpSectionName.Selected.id_Section)

 
Thanks,
Stalin - Learn To Illuminate

initially, I have the default value for the dropdown1 set as empty and that proposed solution doesn't work.

But I changed my logic here and it's working.

 

thank you

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

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