cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
theguzz
Regular Visitor

Empty gallery because of distinct function in dependent combobox ?

Hi everyone, 

I've created a gallery (based on a Sharepoint list) with three comboboxes as filter. The combobox3 is dependent on combobox2's selection. This works fine.

However, the gallery turns out to be empty, now. 

 

Items property on combobox3 (cb_3ebene):

Distinct(Filter(Database;Product.Value = cb_2ebene.Selected.Value);Theme.Value)

Hint: When I use ForAll instead of Distinct my gallery is not empty. However, it will show duplicate choices of my Sharepoint list. 

 

Items property of my gallery:

Filter(Database;Or(search.Text in Title);

Or(IsBlank(cb_1ebene.SelectedItems);
    IsEmpty(cb_1ebene.SelectedItems);
    true in ForAll(
        cb_1ebene.SelectedItems;
        ThisRecord.Value in Branche.Value));

Or(IsBlank(cb_2ebene.SelectedItems);
    IsEmpty(cb_2ebene.SelectedItems);
    true in ForAll(
        cb_2ebene.SelectedItems;
        ThisRecord.Value in Product.Value));


Or(IsBlank(cb_3ebene.SelectedItems);
    IsEmpty(cb_3ebene.SelectedItems);
    true in ForAll(
        cb_3ebene.SelectedItems;
        ThisRecord.Value in Theme.Value))

) 

 I just think it's something about the ForAll function in my gallery but I don't know how to fix this. I really appreciate any help here. Thanks in advance!

2 REPLIES 2
Masino
Super User
Super User

Filter(Database;Or(search.Text in Title);

I think there is an error here....Or?

thanks for the quick reply. Do you mean the " ; " ? I'm using the European/German Power Apps verson. A "," is a ";" there.

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (6,341)