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

Filter gallery connected to CRM by combobox

I have an entity called 'Dogs' and in it there is a multi-select optionset called 'skills'. 'skills' contain items such as Sit, Heel, Bark and Paws. Then I have created some records for Dogs (e.g. Alpha knows Sit, Bravo knows Heel, Charlie knows Sit and Paws, etc)

In powerapps I have a combobox with items containing Sit, Heel, Bark and Paws. There is a gallery to show the names of the Dogs. I want to be able to filter the gallery to show dogs with certain skills based to the skills I'd selected in the combobox.

 

At the moment my gallery has:

Item = Filter(Dogs,ComboBox1.SelectedItems.Value in skills)
and this is not showing anything. There is an error for Value which says "Invalid arguement type. Cannot use table value in this context". When I remove Value, the error moves to SelectedItems with the same error message. How do I get this to work?

4 REPLIES 4
Sijts
Level 8

Re: Filter gallery connected to CRM by combobox

The choices field is like an embedded table.

so probably skills.value or something like that will probably work.

skills itself is a table with multiple options, like sit bark etc.

 

Filter(Dogs,combobox1.selecteditems.value in skills.value) 

victor1
Level: Powered On

Re: Filter gallery connected to CRM by combobox

 


@Sijts wrote:

The choices field is like an embedded table.

so probably skills.value or something like that will probably work.

skills itself is a table with multiple options, like sit bark etc.

 

Filter(Dogs,combobox1.selecteditems.value in skills.value) 


skills.value does not work

it doesn't auto suggest anything when i write skills-period

victor1
Level: Powered On

Re: Filter gallery connected to CRM by combobox

I did it with:

Filter(Dogs,ComboBox2.Selected.Value in Text(skills))

 

However when I select multiple options in the combobox the gallery result is incorrect. For example I want to search for a dog that has skills Sit AND Paws. The result shows dogs with Sit ONLY, Paws ONLY, Sit and Heel, Paws and Bark.

 

How do I get Sit and Paws only from the result??

 

I tried

Filter(Dogs,ComboBox2.SelectedItems.Value in Text(skills))

but it doesn't work. it gave error mentioned above.

 

victor1
Level: Powered On

Re: Filter gallery connected to CRM by combobox


@victor1 wrote:

I did it with:

Filter(Dogs,ComboBox2.Selected.Value in Text(skills))

 

However when I select multiple options in the combobox the gallery result is incorrect. For example I want to search for a dog that has skills Sit AND Paws. The result shows dogs with Sit ONLY, Paws ONLY, Sit and Heel, Paws and Bark.

 

How do I get Sit and Paws only from the result??

 

I tried

Filter(Dogs,ComboBox2.SelectedItems.Value in Text(skills))

but it doesn't work. it gave error mentioned above.

 


Actually, correction to above regarding selecting multiple options. It only filters by the latest checked option. So if I checked Sit, the results shows all record that includes Sit. AND if I also check Paws after(so selected Sit and then Paws), the results shows all recodes that include Paws.

Helpful resources

Announcements
Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Join THE global Microsoft Power Platform event series

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Microsoft Business Applications Virtual Launch

Join us for the Microsoft Business Applications Virtual Launch Event on Thursday, April 2, 2020, at 8:00 AM PST.

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (10,230)