cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Kudo Kingpin
Kudo Kingpin

Comparing two SharePoint lists with the same column names using a filter

Say I have the following incomplete code snippet

 

ForAll(MyCollection,Filter(AnotherCollection, Title = Title))

"MyCollection" and "AnotherCollection" both have a column named "Title". How do I compare them using "=" in the filter so that PowerApps knows that one "Title" is from "MyCollection" and the other is from "AnotherCollection" ?

 

Thank you!

1 ACCEPTED SOLUTION

Accepted Solutions
Resident Rockstar
Resident Rockstar

My syntax was indeed off. It should have been:

 

Title = MyCollection[@Title]

 

 

View solution in original post

3 REPLIES 3
Resident Rockstar
Resident Rockstar

I believe the best solution is using the disambiguation symbol "@" and defining your column from the other list. I am doing this from memory, so it may be a bit different but I believe it is:

 

ForAll(
     MyCollection,
     Filter(
          AnotherCollection,
          Title = MyCollection.[@Title]
     )
)

That should at least be headed in the right direction if I messed up the syntax.

Doesn't seem to be working for me with that syntax Smiley Sad 

 

I tried this 

Title = MyCollection.Title

with no success

 

Resident Rockstar
Resident Rockstar

My syntax was indeed off. It should have been:

 

Title = MyCollection[@Title]

 

 

View solution in original post

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Top Solution Authors
Top Kudoed Authors
Users online (57,042)