cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Tamer66
Level: Powered On

Filter Gallery with IN and Dropbox

Hello Forum,

 

i need a little bit support for filterning a gallery with a DropDown Box.

 

My Situation:

i have 2 collections

- "myContracts" are Data from Azure DB with Contractdata

-  "myGroups" are groups in Office365 that contains members and GroupOwners

The Groupname is the same name as the contractname in myContracts

 

If a user loged in Powerapps, he can see in a gallery all contracts from his owned group (groupname). It is possible the user has an ownership for more as one group. In this case he can see the contracts from more as one.

 

Filter(myContracts; ArtName in myGroups.displayName)

This works pretty fine.

 

My Challange

I want use a dropdown field and a searchfield to make using the gallery view more easier.

To get the values for my DropDown i user my Group Collection myGroup

 

In my Gallery i use this code but that gives me an error.

Filter(myContracts; ArtName in myGroups.displayName = Dropdown1.Selected.Value)

Has anyone an idea or tip for me.

 

Thanks!

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Filter Gallery with IN and Dropbox

Hi @Tamer66 ,

Could you please share a bit more about the formula you typed within the Items property of the Dropdown box?

Do you set the Items property of the Dropdown box to myGroups?

Further, do you want to filter your Contracts records based on the selected group within the Dropdown box?

 

Based on the formula that you mentioned, I think there is something wrong with it. Please consider modify your formula as below:

Filter(myContracts; ArtName = Dropdown1.Selected.displayName)

Note: I assume that the Items property of your Dropdown box set to following:

myGroups

 

In addition, you could also consider add a ComboBox control within your app, set the Items property of the ComboBox to follownig:

myGroups

Set the SelectMultiple proeprty to following:

true

Then set the Items property of the Gallery to following:

Filter(myContracts; ArtName in ComboBox1.SelectedItems.displayName)

Note: You could select multiple groups within above ComboBox control.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
1 REPLY 1
Community Support Team
Community Support Team

Re: Filter Gallery with IN and Dropbox

Hi @Tamer66 ,

Could you please share a bit more about the formula you typed within the Items property of the Dropdown box?

Do you set the Items property of the Dropdown box to myGroups?

Further, do you want to filter your Contracts records based on the selected group within the Dropdown box?

 

Based on the formula that you mentioned, I think there is something wrong with it. Please consider modify your formula as below:

Filter(myContracts; ArtName = Dropdown1.Selected.displayName)

Note: I assume that the Items property of your Dropdown box set to following:

myGroups

 

In addition, you could also consider add a ComboBox control within your app, set the Items property of the ComboBox to follownig:

myGroups

Set the SelectMultiple proeprty to following:

true

Then set the Items property of the Gallery to following:

Filter(myContracts; ArtName in ComboBox1.SelectedItems.displayName)

Note: You could select multiple groups within above ComboBox control.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.