cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
rareProfessor
Regular Visitor

Can't filter a lookup field from another table with a gallery selection

This should be easy but I just can't make it work.

 

I've got two SharePoint lists, 'IB Learning areas' (one column only) and 'Learning tools list'. The latter includes a lookup field containing choices from the former, with multiple options able to be selected.

 

I want to use a gallery (galSubjects) to select a learning area, then filter all records in 'Learning tools list' based on that. I'm finding simple options not working and complex ones confusing!

 

Simple (but failed) methods

Filter([@'Learning tools list'], galSubjects.Selected.Title in Subject_Areas)

- error with Subject_Areas; "Invalid schema expected a one0column table."

 

Filter([@'Learning tools list'], galSubjects.Selected.Title in 'Learning tools list'.Subject_Areas)

- error is with Title; "Can't convert text to a table"

 

More complex

I'm trying to figure out this 'Choices' command I'm reading about, but I'm twisting myself in knots. Here's what I've tried and I feel I'm not even close:

 

Filter(Choices([@'Learning tools list'].Subject_Areas), Value in Filter('IB Learning areas', 'IB Learning areas'.Learning Area = galSubjects.Selected.Title).Title)

 

I've attached screenshots that should help explain, I really feel like this should be simple and I'm missing something so basic!

2 REPLIES 2
eka24
Super User III
Super User III

You will need a lookup function. But to be able to do that, clarify are you using the formula inside a Gallery or Outside the Gallery. A screenshot of where the formula is located will help

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

I've read about lookups, though I understand they only return a single record? Happy to be wrong.

 

Have attached the screenshot of the code used in a gallery, although there's not a lot to see as it's blank and not working yet! Hope that clears up what I'm trying to do.

 

As an aside, I'm planning on using the sort function that came (this app was pre-generated from a list) but I've stripped that code out until I can at least get something shown in the gallery!

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Top Solution Authors
Top Kudoed Authors
Users online (66,136)