# Filter table against another

**URL:** <https://forum.robotframework.org/t/filter-table-against-another/5138>\
**Category:** Development\
**Created:** [4 January 2023 17:40 UTC](https://forum.robotframework.org/t/filter-table-against-another/5138 "2023-01-04T17:40:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kv94](https://avatars.discourse-cdn.com/v4/letter/k/ac8455/32.png) [@kv94](https://forum.robotframework.org/u/kv94)\
**Post date:** [4 January 2023 17:40 UTC](https://forum.robotframework.org/t/filter-table-against-another/5138/1 "2023-01-04T17:40:53Z")

</div>

Is there a way to compare two tables in order to see if one or more values from the first table are contained inside a second one?

The workaround I figured for this is to get each value that I want to verify from the first table and use “Find Table Rows” to see if I find it in the second table. Is there a way that is more efficient to achieve this? I mean, like comparing everything at once. I checked the RPA.Tables Library but I did not find anything.

---

<div class="post-metadata">

**Author:** ![damies13](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/damies13/32/623_2.png) [@damies13](https://forum.robotframework.org/u/damies13)\
**Post date:** [5 January 2023 01:51 UTC](https://forum.robotframework.org/t/filter-table-against-another/5138/2 "2023-01-05T01:51:43Z")

</div>

Hi Keny,

Robot Framework doesn’t have a concept of tables, but some libraries do when relevant to applications that have tables.

Which Library are you using?

As a general approach you could pull all the values from table 1 and put them  
into a list called something like `@{table1}` and another list for table 2 `@{table2}`.  
Then you can use a for loop on `@{table1}`'s values using [List Should Contain Value](http://robotframework.org/robotframework/latest/libraries/Collections.html#List%20Should%20Contain%20Value) to check if the value is in `@{table2}`  
If the two values from each table should be the same you could also use [Lists Should Be Equal](http://robotframework.org/robotframework/latest/libraries/Collections.html#Lists%20Should%20Be%20Equal)

Dave.

---

<div class="post-metadata">

**Author:** ![kv94](https://avatars.discourse-cdn.com/v4/letter/k/ac8455/32.png) [@kv94](https://forum.robotframework.org/u/kv94)\
**Post date:** [5 January 2023 18:42 UTC](https://forum.robotframework.org/t/filter-table-against-another/5138/3 "2023-01-05T18:42:30Z")

</div>

Hi Dave,

Thanks for the explanation, I am using the RPA.Tables library with Robocorp. The approach you gave me sound about right for what I am trying to do.
