cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper I
Helper I

Galery Filter by Combobox (Sharepoint Choice column)

Hi Together,

 

i just try to Filter my Galery by a Combobox wich gets its Data from a Sharepoint List Column with the Type Choices.

 

I have Data in the column "P" like:

1, 2

1, 3

1

2

 

I now want to show in the Galery for example all Rows with "1" or with "1" and "2"

I dont find realy syntax for filtering in Power Apps "Items" Options on the Internet. 

 

I tried it with: (Galery "Items")

Filter(Table; P in ComboBox3.SelectedItems.P)

 

Maybe someone can Provide the right Syntax?

 

Thanks and Regards

Florian

20 REPLIES 20

Hi @WarrenBelz ,

 

you are right it is a multi value Sharepoint List Column. I know that this is complex 😞

 

i had a look again to the collection. My First Value is "1"

I've tried it  with your Idea of Value or Value 1. I also tried Item or Items or Item 1

But nothing worked. It says the Name is invalid

 

Do you know if there is a debug field where i can see what Data i would get with the filter i suggest or wich text i get from the combobox? 

 

Do i have the possibility to search for an match in the hole colTable.P Table/Rows? 

 

Hi @TheRealFlori ,

What is the name of the heading in the table you can see in the collection? That is what you need to reference. 

So if the Heading is Value1, then the reference is P.Value1

Hi @WarrenBelz 

 

it look like this ColTable.png

But my "1" has a pause eg: "1 1"

 

I've tried your Idea. 

Everytime i get an Error

Filter(colTable; P.Value in ComboBox3.SelectedItems)
Filter(colTable; P.Value1 1 in ComboBox3.SelectedItems)
Filter(colTable; 'P.Value.1 1' in ComboBox3.SelectedItems)
Filter(colTable; P.Value.'1 1' in ComboBox3.SelectedItems)

Hi @TheRealFlori ,

Your field is not P - it is Plant

The correct reference is

Filter(
   colTable; 
   Plant.Value in ComboBox3.SelectedItems
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Hi @WarrenBelz ,

 

i know. I've already did this. It changes nothing 😕 

The "P" was only to make it easier for us 😉

 

Regards

Flo

Hi @TheRealFlori ,

This has got to be something very simple we are missing as this is a very basic query. 

Is the value of Plant.Value numeric? Try

Filter(
   colTable; 
   Text(Plant.Value) in ComboBox3.SelectedItems
)

 

Hi @WarrenBelz 

 

thanks for your idea. I've tried this also and i search in google an tried some Text_Format function but this also wont work. 

Filter(colTable; Text(Plant.Value) in ComboBox3.SelectedItems)

I get an error that he expected text or an number  ....

 

funny If i give it the source directly to my Sharepoint List it says

Filter(BLOG_DB; Text(Plant.Value) in ComboBox3.SelectedItems)

that in text is an argument missing. I've searched in the official Documentation from Powerapps and found only formating in Dates or time. Is there also a format into Text? Maybe this will help?

 

Hi @TheRealFlori ,

There comes a time to call n the cavalry . . . I am out of ideas.

I will tag my colleague @Eelman who loves unravelling formulas - I will keep track of this.

 

Hi @WarrenBelz 

 

haha, thank you for tag your colleagues!

I know its complexe because of the special Sharepoint column

 

Thanks!

Florian

@WarrenBelz thanks for the tag, this was a really tough one. I couldn't solve it on my own, I had to use the magic of @RezaDorrani and one of his fantastic delegation videos. These should be in every Appsters toolkit!

 

@TheRealFlori 

I will try to give you the answers you need for your solution but you may need to adjust it slightly by watching the above video?

 

ComboBox3.Items is:

Choices(BLOG_DB.Plant)

Note: Reza uses a ClearCollect to get his choices whereas I've just used the Choices function. Not sure if my way causes any issues though?

 

Your Gallery needs to be a Flexible Height Gallery, where Gallery1.Items is:

BLOG_DB

 

Now, all the labels, dropdowns, datepickers you have in your gallery select them all using CTRL then Group them together. Then, the Visible property of this group is set to (this is pure magic!!):

"yes" in Concat(ForAll(ComboBox3.SelectedItems.Value, If(Value in ThisItem.Plant.Value, "yes", "no")), Value)

 

And that's it! Watch the video above if you get stuck, here it is in action:

ComboFilterMultiple.gif

 

Let me know if you get stuck

 

View solution in original post

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Top Solution Authors
Top Kudoed Authors
Users online (21,175)