Showing results for 
Search instead for 
Did you mean: 
Frequent Visitor

Use filter or Lookup to show a selected value connected to another table

I posted this in connecting to data but figured it might get more response in the general discussion.

Please contact me if you don't understand the issue. 


I have a Detailform which retrieves information from another screen.

So in this example I have pressed my Sales order "000002" and gets to my detail screen.

I have managed to get the "company" and "Sales order" data by using my DataSource "SalesOrderHeaders" and set the Item to "BrowseGallery2.Selected". (Which is the name of the screen where I selected my Sales order).


I also want to retrieve the Item number but this is from another table called SalesOrderLines. I want it to match with my Sales order number "000002".

Can I use Filter/Lookup to get data from my SalesOrderLines and match it with the Sales order number somehow?


Thanks for the help


Fel item.JPG

Community Champion
Community Champion

If there is a one-to-one relation then use LookUp, if one-to-many then use Filter.

Please let me know if you need details, but being specifc with the issue you are facing in using these functions (i.e. what you tried and what you got)

Thank you,


Well, I have tried to do a filter but I can't get it to work.

Not sure if Im doing it correctly.


Filter(SalesOrderLines,SalesOrderHeader.SalesOrderNumber = BrowseGallery2.Selected.SalesOrderNumber)


So I want it to the get the SalesOrderLines that is connected to the SalesOrderHeader.
I chose the SalesOrderNumber in my BrowseGallery2.

Rikard, I suggest that we Skype next week (Wed-Fri) so I can show you what needs doing.  I will send you a private message with my contact.

Memorable Member
Memorable Member

Hello RikardE,

Let's name the column of SalesOrderLines table that has the Item number that you need ItemNumber.

Does the following, work for you..?

LookUp(SalesOrderLines,ItemNumber= BrowseGallery2.Selected.SalesOrderNumber,ItemNumber)

(Replace ItemNumber with the actual name of your column)

Helpful resources

Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (5,737)