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

Filtering a sharepoint list based on label

Hello,

 

I am trying to filter down a sharepoint list based on a pre-populated field in a label.  

For example in sharepoint list A I have 1,2,3,4,5,6,7,8,9.  In sharepoint list B I have a lookup field which can contain multiple from sharepoint list A.  I want PowerApps to take the number from sharepoint list A and populate a dropdown box where the value in label1 is in sharepoint list B.  

 

The code I have currently is Filter('Inside Location'.Title, Label1.Text in 'Inside Location'.BuildingID)

 

I get the error message "Can't Convert this data type.  Power Apps can't convert this Text to a Table"

 

I have tried this with a dropdown box as well and I get the same error message just with Number instead of Text.

 

Any help is greatly appreciated.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Frequent Visitor

Found a solution for this.  Instead of having a lookup field in the sharepoint list B, I created a single line of text field.  I then input the data from list A manually in the single line of text.  I used the search command and variables to get the filtered list of items in List B.

Search('Inside Location', BuildingID, "BuildingID")

 

View solution in original post

4 REPLIES 4
Highlighted
Super User III
Super User III

@NWEASD 

What other options do you have for the 'Inside Location' column?  Can you collect it and show me the structure?


Some ideas:

Filter('Inside Location'.Title, Label1.Text in 'Inside Location'.Value)
Filter('Inside Location'.Title, Label1.Text in 'Inside Location'.BuildingID.Value)

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

 

Highlighted

NWEASD_0-1603899217651.png

Here is am image of the list itself. It does not look like there is an option for 'Inside Location'.Value or any option for BuildingID.  The BuildingID column is a lookup column with multiple values possible.

Highlighted
Frequent Visitor

I am also open to other ideas.  The end goal is to get a form dropdown to be filtered based on Sharepoint list A.  The thought that came to my mind was a hidden field to get the filtered choices and redirect the form drop down items to the hidden drop down values.

Highlighted
Frequent Visitor

Found a solution for this.  Instead of having a lookup field in the sharepoint list B, I created a single line of text field.  I then input the data from list A manually in the single line of text.  I used the search command and variables to get the filtered list of items in List B.

Search('Inside Location', BuildingID, "BuildingID")

 

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,088)