cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper I
Helper I

Gallery and a lookup column (Sharepoint)

Hi there, 

I have a list of term dates in sharepoint with the school name as a lookup column, I want to be able to filter a gallery from a drop down on the screen and the lookup column in sharepoint. I have been looking at the filter command and I understand the .ID of the lookup column but how do i compare that the drop down on the screen (they are from the same drop down btw). 

 

 

 

and I need to filter this on a lookup column in SharePoint. I can get the .ID of the lookup column in sharepoint but how can i get the ID of the drop down in powerapp to compare ? 

 

Thanks a lot in advance. 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

@JasonHough 

Do you have "allow multiple selections" enabled on that lookup?  If so, that is probably a source of the issue.

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

View solution in original post

5 REPLIES 5
Highlighted
Super User III
Super User III

@JasonHough 

If I am understanding correctly, you have a DropDown control that gets its Items from the list in SharePoint that your lookup column is defined for.

You have a need to filter the Gallery of Term Dates from a SharePoint list based on the value of the DropDown selection.

So far so good?  So, for this to work, you need to set your filter on the Items property of the Gallery.  You can do this either by ID or by Value.  Much of this will depend on the Items property of your DropDown and what columns are available in the records of the DropDown.

 

If you have a DropDown that has the Items set to the entire List defined in the Lookup column, then you will have all the components you need.  If you are filtering that DropDown or using other functions such as Distinct, then you will have potentially less.

 

IF your dropdown items include the ID of the list items from the dropdown source, then you can use a filter similar to the following:

Filter(yourTermDateDataSource, theLookupField.Id = DropDown.Selected.ID)

IF your dropdown items do not include the ID, then you can still use the value with a formula similar to the following:

Filter(yourTermDateDataSource, theLookupField.Value = DropDown.Selected.Value)

There are several factors to this that will all depend on your items property for the DropDown and the definition of the SharePoint lookup column.

So, if there are issues in getting to what you need based on the above, then post back and include some of those details.

 

I hope this is helpful.

 

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!
Highlighted

Hi yes you are correct , I have : 

 

A list of rows in a sharepoint list 

A main list which has a lookup column to the above list. 

I am trying to match when the drop down is equal to London, then the gallery shows all in the list which has london in its local authority column. 

 

I do not seem to have an ID on the drop down, so thanks to you i used : 

 

Filter(Periods_1, Local_Authority.Value = SponsorDD.Selected.Value)

 

i do not have any errors but i also do not have any content. 

 

Thanks for your help so far. 

 

 

Highlighted

@JasonHough 

A couple things:

1) What is the formula for your Items property on your DropDown?

2) Can you try to "hard push" the results?  - set your formula to Filter(Periods_1, Local_Authority.Value = "London") and see if you get any results.

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!
Highlighted

I have tried an hard push and it did not work.. So there must be something with the lookup column which is acting strange, so I written an MSFLOW which duplicates this column and adds it into another column (Single line of Text) and it worked fine 🙂 

Highlighted

@JasonHough 

Do you have "allow multiple selections" enabled on that lookup?  If so, that is probably a source of the issue.

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

View solution in original post

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 (9,617)