cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

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
Highlighted

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
Highlighted
Community Support
Community Support

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.
Highlighted

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

Highlighted
Frequent Visitor

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

Highlighted

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

Highlighted

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

Highlighted

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

Highlighted
Frequent Visitor

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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (3,130)