# Rest API filter

**URL:** <https://www.epiusers.help/t/rest-api-filter/72900>\
**Category:** Epicor ERP 10\
**Tags:** rest, rest-api\
**Created:** [November 18, 2020, 8:49am UTC](https://www.epiusers.help/t/rest-api-filter/72900 "2020-11-18T08:49:13Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zoher\_Ali](https://www.epiusers.help/user_avatar/www.epiusers.help/zoher_ali/32/11615_2.png) [@Zoher\_Ali](https://www.epiusers.help/u/Zoher_Ali)\
**Post date:** [November 18, 2020, 8:49am UTC](https://www.epiusers.help/t/rest-api-filter/72900/1 "2020-11-18T08:49:13Z")

</div>

Hi there,

I want to apply Plant filter on PartWhseSearchSvc. Even though the column for Plant is available in results, when I put filter `Plant eq 'something'` .  
It gives error: `Invalid column name 'Plant'`.  
Can anyone please help with this?  
Thanks

---

<div class="post-metadata">

**Author:** ![Olga](https://www.epiusers.help/letter_avatar_proxy/v4/letter/o/57b2e6/32.png) [@Olga](https://www.epiusers.help/u/Olga)\
**Post date:** [November 18, 2020, 4:15pm UTC](https://www.epiusers.help/t/rest-api-filter/72900/2 "2020-11-18T16:15:47Z")

</div>

Filter is translated to the underlying WhereClause for GetRows method. It works only with database fields.  
Probably in your case Plant is not database field and filled manually from the code? in that case you cannot use it in filter.

---

<div class="post-metadata">

**Author:** ![adaniell](https://www.epiusers.help/letter_avatar_proxy/v4/letter/a/278dde/32.png) [@adaniell](https://www.epiusers.help/u/adaniell)\
**Post date:** [November 19, 2020, 2:45am UTC](https://www.epiusers.help/t/rest-api-filter/72900/3 "2020-11-19T02:45:08Z")

</div>

The site identifier field for the part warehouse(PartWhse) table is ‘KBPlant’.  
Using this field in the filter for a REST call worked in my testing.  
Sample request url: [https://epicor102100/erp10train/api/v1/Erp.BO.PartWhseFullSearchSvc/PartWhseFullSearches?$filter=KBPlant%20eq%20’MfgSys’](https://epicor102100/erp10train/api/v1/Erp.BO.PartWhseFullSearchSvc/PartWhseFullSearches?$filter=KBPlant%20eq%20'MfgSys')

---

<div class="post-metadata">

**Author:** ![Zoher\_Ali](https://www.epiusers.help/user_avatar/www.epiusers.help/zoher_ali/32/11615_2.png) [@Zoher\_Ali](https://www.epiusers.help/u/Zoher_Ali)\
**Post date:** [November 19, 2020, 5:50am UTC](https://www.epiusers.help/t/rest-api-filter/72900/4 "2020-11-19T05:50:05Z")

</div>

Kanban Warehouse is blank for all parts. So we can’t filter it on that field.

---

<div class="post-metadata">

**Author:** ![adaniell](https://www.epiusers.help/letter_avatar_proxy/v4/letter/a/278dde/32.png) [@adaniell](https://www.epiusers.help/u/adaniell)\
**Post date:** [November 19, 2020, 1:40pm UTC](https://www.epiusers.help/t/rest-api-filter/72900/5 "2020-11-19T13:40:22Z")

</div>

Have you tried using WarehouseCode and KBPlant?

---

<div class="post-metadata">

**Author:** ![Jonathan](https://www.epiusers.help/letter_avatar_proxy/v4/letter/j/aeb1de/32.png) [@Jonathan](https://www.epiusers.help/u/Jonathan)\
**Post date:** [November 19, 2020, 4:34pm UTC](https://www.epiusers.help/t/rest-api-filter/72900/6 "2020-11-19T16:34:39Z")

</div>

Seems like Plant is an external field assigned after the search looking at the warehouse plant and some other validations, so like Olga said you can’t filter directly on Plant.
