filter_inventory function

Filter the inventory of tables