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

Filtering sharepoint list based on the ID value of another sharepoint list

I have two sharepoint lists that I am connected to in my project. I want a Data table that only shows entries where the ID in my current table, is equal to the Last('Sharepoint List1').ID. I'll give an example of the formula I'm trying to get to work. 

 

Filter('Sharepoint List2', 'Sharepoint List2'.ID1 = Last('Sharepoint List1').ID)

This doesn't work, and tells me that the "=" is an "invalid argument type"

I'm placing this formula in the OnVisible for the page where the Data table is located.

 

Also I think it's worth mentioning that the ID value in "Sharepoint List1" is the automatically generated hidden ID value that sharepoint lists make, while the ID1 value in "Sharepoint List2" is one that I've made to reference the hidden ID from the other list. 

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Filtering sharepoint list based on the ID value of another sharepoint list

Hi @snickell ,

Do you wan to filter 'Sharepoint List2' according the ID column in 'Sharepoint List1'?

Firstly, you could try this formula:

Filter('Sharepoint List2',ID1 = Last('Sharepoint List1').ID)

'Sharepoint List2'.ID1 is a table,it can’t be used to compare with a value.

Secondly, you should set the DataTable’s Items property instead of the screen’s OnVisible.

test419.jpg

 

 

Best regards,

Community Support Team _ Phoebe Liu

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Re: Filtering sharepoint list based on the ID value of another sharepoint list

Hi,

 

With what I read in your post, you just put the formula in the OnVisible statement of your page.

The problem is that the function will give you a result with the type Table... I don't understand your function then!

 

You have to put your filter in the Items statement of a Gallery. Do it and tell me if you still have the problem  

 

Regards,

 

Louis

Community Support Team
Community Support Team

Re: Filtering sharepoint list based on the ID value of another sharepoint list

Hi @snickell ,

Do you wan to filter 'Sharepoint List2' according the ID column in 'Sharepoint List1'?

Firstly, you could try this formula:

Filter('Sharepoint List2',ID1 = Last('Sharepoint List1').ID)

'Sharepoint List2'.ID1 is a table,it can’t be used to compare with a value.

Secondly, you should set the DataTable’s Items property instead of the screen’s OnVisible.

test419.jpg

 

 

Best regards,

Community Support Team _ Phoebe Liu

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 318 members 5,701 guests
Please welcome our newest community members: