# BPM with conditions using related table **Category:** [Epicor ERP 10](https://www.epiusers.help/c/e10/5) **Created:** 2016-11-28 16:16 UTC **Views:** 1341 **Replies:** 4 **URL:** https://www.epiusers.help/t/bpm-with-conditions-using-related-table/36429 --- ## Post #1 by @ckrusen I'm trying to make a BPM that shows a warning in Order Entry, when a custom field in the related Customer record has a certain value. I thought the condition would be: Number of Rows in the **qryCustomer_JEID** query **is more than 0** With that Query consiting of two tables: > ttOrderHed, and ERP.Customer With the table relationships: > ttOrderHed.Company = Customer.Company > ttOrderHed.CustNum = Customer.CustNum and a table criteria of > Customer.JECustID_c = 'PEND' constant But I get an error anytime I have anything set for table criteria, even when I use a non custom field. > Error CS1593: Delegate 'System.Func' does not take 1 arguments When I remove the table criteria, I don't get the error. I also don't get the desired functionality. :unamused: Am I not using the Table Criteria properly? --- ## Post #2 by @josecgomez Single quotes in C# are for char's strings are double quoted. --- ## Post #3 by @ckrusen I just typed PEND (no quotes at all) into the Specify Value dialog. The added single quotes in the post by me was an error. What should be entered in there when the value is a string? No quotes, 'single quotes', or "double quotes" ? --- ## Post #4 by @josecgomez Double quotes probably --- ## Post #5 by @Nancy In 905702a and earlier, I've had problems with getting = constant working. Once upon a time on this awesome user group someone said to use MATCHES and set the constant to e.g. asterisk PEND asterisk (i.e., preview not showing typed out asterisk so sorry have to spell out, don't use spaces tho ~ don't use quotes) or whatever your constant is. It now works in my BAQs. Hopefully this works for you too :slight_smile: Nancy --- **Canonical:** https://www.epiusers.help/t/bpm-with-conditions-using-related-table/36429 **Original content:** https://www.epiusers.help/t/bpm-with-conditions-using-related-table/36429