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

Gallery items where the filter source is a different list

Hi,

I'm planning to do an simple event manager for a reccuring event and one part of it is the session backlog.

The data is located in two different sp lists: 'EMT.Sessions' and 'events'

One column 'EDD' within 'EMT.Session' looks up the data from the 'events' list.

The 'events' list has a colum (type choice) with the state of the event (planned, open for registration, done)

 

What I want to do now is to create a Gallery where it only shows sessions which are assigned to events that are not in the status 'done', but I really can't get my head around the syntax and the expected format.

 

At the moment the Items value of the Gallery has the following formula:

SortByColumns(Filter('EMT.Session', StartsWith(Title, TextSearchBox1.Text),EDD.Value = "2018-2"), "Title", If(SortDescending1, Descending, Ascending))

 

for what I plan to do the "2019-2" after EDD.Value should be replaced with something like this:

lookup(events, status != 'done')

But I can't get it to work as it always rejects either the operator and/or the returned result as wrong

 

1 ACCEPTED SOLUTION

Accepted Solutions
tuhriel
Level: Powered On

Re: Gallery items where the filter source is a different list

Okay that makes sense. There was still an argument missmatch, but I could figure that out:

 

SortByColumns(
    Filter(
        'EMT.Session',
        StartsWith(Title, TextSearchBox1.Text),
        EDD.Id in Filter(events, status.Value <> "done").ID),
    "Title",
    If(SortDescending1, Descending, Ascending))

Thanks a lot

 

View solution in original post

2 REPLIES 2
Power Apps Staff CarlosFigueira
Power Apps Staff

Re: Gallery items where the filter source is a different list

You're looking for something along the lines of the expression below:

SortByColumns(
    Filter(
        'EMT.Session',
        StartsWith(Title, TextSearchBox1.Text),
        EDD.Id in Filter(events, status <> "done").ID),
    "Title",
    If(SortDescending1, Descending, Ascending))

The idea is to take the ID property of all events with status different than 'done', then filter the sessions list where the id of the lookup column is in the ids you found before.

tuhriel
Level: Powered On

Re: Gallery items where the filter source is a different list

Okay that makes sense. There was still an argument missmatch, but I could figure that out:

 

SortByColumns(
    Filter(
        'EMT.Session',
        StartsWith(Title, TextSearchBox1.Text),
        EDD.Id in Filter(events, status.Value <> "done").ID),
    "Title",
    If(SortDescending1, Descending, Ascending))

Thanks a lot

 

View solution in original post

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 (3,745)