EpiCombo Dynamic Filtering with LIKE

I have been able to do a great number of things with the EpiCombo that remove the need for code to populate a dynamic list of values, but I have run into a need to filter a field based off of a value in a tilde separated string. Below is an example image of what I am doing. In this case, Charater01 could be populated with Value1~Value2~Value3 and I need to compare the ProdCode to one of the values.
image

Have you tried using the SearchFilter, instead of filter append? When I use an EpiCombo for UserCodes table, I put a filter in the SearchFilter box such as CodeTypeID = ‘TEST’

That works for regular filters (which I use all the time), but not for something with LIKE or CONTAINS.

Just had a need to use a new UDCode dropdown. Tried it with LIKE in that box, and it works no problem. Make sure you’re using % for wildcard, not * as in some other places

Yes, but the SearchFilter doesn’t allow for a dynamic filtering. That is why I’m using the EpiFilters and EpiFiltersParams.
I obviously can write code, but the EpiCombo is so powerful, I can avoid writing most dropdown code with it out of the box.

You should be able to make it work. Turns out the “Filters” are executed against SQL. So you can even use the BAQ Helpers, like Ice.Entry etc.

Just figured I nudge you on it :slight_smile:

SearchFilter + EpiFilters + EpiFiltersAppend are just combined and executed against SQL (they are not post-filters). So you can even leave the SearchFilter blank and just use EpiFilters or EpiFiltersAppend, doesn’t matter.

5 Likes

Ah. This makes sense. It really was an issue with how I wrote the syntax.
I did not know I could use the BAQ Helpers too. This is great. Can I give double points? :smile:

:smiley: yes since those BAQ Functions are just Functions in SQL actually.

image

Also just for the record, if your SearchFilter starts with CodeTypeID Epicor will set the DropDownStyle Automatically to DropDownList. So you dont have to set it in Code anymore.