# Pass parameter to PartBinSearch in a button search **Category:** [Epicor ERP 9](https://www.epiusers.help/c/e9/7) **Created:** 2016-10-20 17:03 UTC **Views:** 1305 **Replies:** 6 **URL:** https://www.epiusers.help/t/pass-parameter-to-partbinsearch-in-a-button-search/35902 --- ## Post #1 by @Duke When executing Epicor.Mfg.UI.FormFunctions.SearchFunctions.listLookup(this.oTrans, "PartBinSearchAdapter", out recSelected, true, whereClause), the result is empty. Anyway of passing the filter parameter to run the search? --- ## Post #2 by @josecgomez the "whereClause" you should be able to populate with whatever pre-filter you'd like to use. --- ## Post #3 by @Duke Hi Jose, I tried that but it's not returning any results, the datagrid is empty. Ran the tracing and can see it calling the correct methog but the parameters are empty. --- ## Post #4 by @josecgomez Can you paste your whole code (that method at least) It should return something as long as your whereClause is valid --- ## Post #5 by @Duke private DataRow binSearch(string wareHouseCode) { bool recSelected=false; bool morePages = false; string whereClause = "warehouseCode='" + wareHouseCode + "' and uomCode='LB' and partNum ='" + partEpiTextBox.Text + "' and lotNum='" + fromLotEpiTextBox.Text + "'" ; System.Data.DataSet dsLotAdapter=null; System.Data.DataRow adapterRow =null; dsLotAdapter = Epicor.Mfg.UI.FormFunctions.SearchFunctions.listLookup(this.oTrans, "PartBinSearchAdapter", out recSelected, true, whereClause); if (recSelected) { adapterRow = dsLotAdapter.Tables[0].Rows[0]; } return adapterRow; } --- ## Post #6 by @josecgomez Try narrowing it down, just add a simple whereclause like "WarehouseCode='XX'" and see if that works, your whereClause has a lot of parts so maybe not everything on there is true?> --- ## Post #7 by @Duke Tried that as well and still no value returned. I can run the same filters on another scree, say inventory transfer, and will get the expected results. --- **Canonical:** https://www.epiusers.help/t/pass-parameter-to-partbinsearch-in-a-button-search/35902 **Original content:** https://www.epiusers.help/t/pass-parameter-to-partbinsearch-in-a-button-search/35902