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

Filter for multiple values within the same column

My app is running off Sharepoint lists, and I'm beginning to implement offline capability. To sidestep delegation issues with using Sharepoint my collections don't pull more than 500 records.

On launch I'm collecting two main data sources, a list of Appraisals filtered to dates within the last 5 days, and a list of observation statements that are each associated with an appraisal. I'd like to filter that second list based on the IDs of appraisals in the first list. How would I do that? I know how to filter based on a single value in any number of columns, but not on multiple values in a single column.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Filter for multiple values within the same column

Hi @timothylinward ,

 

May I know how did you associate the 2nd list with an appraisal of 1st list? Did you use a lookup column? If so, then you could use this lookup column in 2nd list to filter it. If not, you could add a lookup column and use get the information from 1st list. In this column use 1st list's ID column:

Capture.JPG

 

Then you could use below formulas to achieve this:

 

ComboBox1.Items=Distinct(List1,ID)
Gallery1.Items=Filter(
List2, 
First(LastN(ComboBox1.SelectedItems,1)).Result in Lookup.Value
&&
First(LastN(ComboBox1.SelectedItems,2)).Result in Lookup.Value
&&
First(LastN(ComboBox1.SelectedItems,3)).Result in Lookup.Value
...
)

 

 

1st list name is List1. 2nd list name is List2.

Lookup is the lookup column name in List2.

 

I just tested with this and it works for me. Hope this can help.

 

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.
2 REPLIES 2
Highlighted
Super User
Super User

Re: Filter for multiple values within the same column

Hi @timothylinward ,

One way to do it would be to use a multiselect combobox to select items from the first list, Create a collection by filtering the second list from the selected items from the combobox and then filter the collection by date > Today()-5.  Use the filtered collection as the items property of a gallery displaying the results.

Community Support Team
Community Support Team

Re: Filter for multiple values within the same column

Hi @timothylinward ,

 

May I know how did you associate the 2nd list with an appraisal of 1st list? Did you use a lookup column? If so, then you could use this lookup column in 2nd list to filter it. If not, you could add a lookup column and use get the information from 1st list. In this column use 1st list's ID column:

Capture.JPG

 

Then you could use below formulas to achieve this:

 

ComboBox1.Items=Distinct(List1,ID)
Gallery1.Items=Filter(
List2, 
First(LastN(ComboBox1.SelectedItems,1)).Result in Lookup.Value
&&
First(LastN(ComboBox1.SelectedItems,2)).Result in Lookup.Value
&&
First(LastN(ComboBox1.SelectedItems,3)).Result in Lookup.Value
...
)

 

 

1st list name is List1. 2nd list name is List2.

Lookup is the lookup column name in List2.

 

I just tested with this and it works for me. Hope this can help.

 

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.