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

Filtering issues

Hi All,

 

My apologies if I'm not clear in my explanation.

 

In SP, I have a list with several columns. Two of those columns are lookup columns, so they pull their value from another list.

On the PowerApp side, when I create a Gallery, I'm expecting to see, or have the options to see, the columns and records from the list I'm populating. However, I don't see the lookup columns. Therefore, I found out that I should create a "site column". This works.

 

Though, my intent is to filter the gallery. My final goal is to be able to filter the records as I can do in the SP view. I can't replicate this with PowerApps. I feel like I'm just missing a piece of information.

 

Thanks All.

 

Erik

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Filtering issues

Hi @ErikM9 ,

 

Actually if it's a multiple select lookup column, then you can filter the gallery with it using a combo box control.

 

Insert a combo box control with its Items property set to:

Choices(ListName.MultiLookup)

Then for Items property of the gallery:

Gallery1.Items=Filter(ListName, ComboBox1.Selected in MultiLookup)

 

This works for me. Please have a test.

 

Regards,

Mona

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

View solution in original post

7 REPLIES 7
Community Support Team
Community Support Team

Re: Filtering issues

Hi @ErikM9 ,

 

You can add lookup filed to gallery control by setting below formula in the Text property of label control:

ThisItem.LookupColumnName.Value

 

Did you mean that you want to Filter with Lookup column? If so, then please use below formula in the Items property of gallery control:

Filter(ListName, LookupColumnName.Value=TextSearchBox1.Text)

 

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
ErikM9
Level: Powered On

Re: Filtering issues

Thank you Mona,

 

Maybe the issue lies in that the LookUp column is a choice field that allows multiple checks?

After some discussion, the list of items in the LookUp column is small, therefore, I will create a multiple choice column in the parent list and see what happens.

 

Erik

ErikM9
Level: Powered On

Re: Filtering issues

This is an update to what I've just tried as per my previous message.

 

It didn't work. I created a choice column, allowing for multiple selection. However, I still can't filter based on the contents of that column? I've tried to create a list box in PowerApps to represent and display information from the respective column in SP with the same results of not being able to return a filter list.

 

Due to the nature of my work, I am unable to share the App or screen shots. Though, I'll see if I can create a mock scenario.

 

Thank you

Erik

ErikM9
Level: Powered On

Re: Filtering issues

Thanks again,

 

It appears that I cannot filter the Gallery for a couple reasons.

1) the column of interest isn't available for Gallery view

2) the Lookup wants to return a table and the Gallery wants to see Records

 

This is really curious to me as SharePoint allows me to filter the multiple-choice column. But not in PowerApps.

 

Should I be building the SharePoint columns differently instead?

 

Thank you,

 

Erik

Community Support Team
Community Support Team

Re: Filtering issues

Hi @ErikM9 ,

 

Actually if it's a multiple select lookup column, then you can filter the gallery with it using a combo box control.

 

Insert a combo box control with its Items property set to:

Choices(ListName.MultiLookup)

Then for Items property of the gallery:

Gallery1.Items=Filter(ListName, ComboBox1.Selected in MultiLookup)

 

This works for me. Please have a test.

 

Regards,

Mona

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

View solution in original post

ErikM9
Level: Powered On

Re: Filtering issues

Thanks Mona,

 

I've tried your suggestion below.

However, I get the error message from the Choices function that it has some "invalid arguments".

I assure you that I followed your instructions.

 

I think I have found a workaround though. When an item is submitted from a multiple select ListBox, the value(s) would be concatenated and sent to a single line column in SP. The formula that I found is as follows: Concat(ListBox1.SelectedItems.Value, Concatenate(Text(Value),","))

 

Though, like your function, I get an error of invalid arguments?

 

I'm not sure if there is coding updating, or that I'm trying this on a Mac sometimes versus a PC other times. I refer back to docs. microsoft.com continuously with nearly the same results each time. I replicate what it there on the web, but it doesn't work in my app?

 

A true learning experience 🙂

 

Erik

ErikM9
Level: Powered On

Re: Filtering issues

Hello,

I've accepted as solution even though this solution was not applicable, in the end, to me.

My work-around ending up being to turn the lookup column to a single line text. As information in entered, it would populate that column. The filter is then able to do what I was looking for.

 

Thanks

Helpful resources

Announcements
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

Power Apps Community User Group Member Badge

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

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Users online (4,564)