Error in assigning User Codes to EpiCombo

I’m attempting to assign User Codes to an EpiCombo in a customization. Why am I getting this error?

Here are the properties for the control. Am I missing something?

This is on Time and Expense Entry, and the intent is to generate a list of indirect labor codes, but filtered by the department the employee works in. But how can I get them all to show first?

I can’t remember if it’s UD codes for sure but try changing the ListDataSet to RowsDataSet for EpiDataSetMode.

That did it, thanks!

So the question now is, how to filter based on another value in the dataset, specifically LaborDtl.JCDept

If JCDept is a particular value, I want one CodeTypeID returned, if it’s not that value, I want a different CodeTypeID returned.

Setting the filtering like this produces an error:

Is that the correct place/syntax?

Use single ticks not quotes. That needs to be SQL Syntax. It gets executed on SQL.

Nice!

This is getting to the edge of my comfort zone. I know you can reference other fields from your form with a certain ?syntax and set the filter to equal them. So if in your form, you have a field for the LaborDtl.JCDept, you should be able to use that syntax to replace LaborDtl.JCDept. But that column won’t be in your EpiCombo Rows dataset to filter with. Looks like @hkeric.wci linked you to something that shows that syntax you need to use. Teamwork!

So I got it to work with this:

Weird how the EpiFiltersAppend is using a VBA style expression, but it works nonetheless.

Thanks for everyone’s input!