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

Have each record from table A added to table C if it is not found in table B?

I'm trying to have a table show all records from another table that aren't found in a third table. Using the image as a reference...The application is an inventory tracking app. Currently as items are scanned they are recorded in the "Scanned" table. If items are in the inventory but 

PowerApps.JPGare not scanned they show up in the "Missing" table. The third table I want to show all items that are scanned but not found as entries in the inventory. 

 

So, as in the question, I'm looking for each record from "Scanned" not found in "Inventory" to be added to the currently undefined table at the end.

 

I figured a ForAll was my best answer but I can't seam to figure it out. 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Power Apps
Power Apps

You can use the Filter function with the in operator to do that if the item can be identified by a column (such as a primary key, or an identifier). For example, if the value you're showing in your example is from a column called 'Id' in your tables, then this expression will return a table with the missing items:

Filter(
    Inventory,
    Not(Id in Scanned.Id))

View solution in original post

2 REPLIES 2
Power Apps
Power Apps

You can use the Filter function with the in operator to do that if the item can be identified by a column (such as a primary key, or an identifier). For example, if the value you're showing in your example is from a column called 'Id' in your tables, then this expression will return a table with the missing items:

Filter(
    Inventory,
    Not(Id in Scanned.Id))

View solution in original post

That was surprisingly simple. Thank you!

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.

Top Solution Authors
Top Kudoed Authors
Users online (92,297)