E9: EpiCombo on UserCodes Filter only for IsActive = true

This seems to trip me up in E9 on the rare time I need to use it.
So I have an EpiCombo that is successfully retrieving User Codes I setup, however I only want to retrieve User Codes where IsActive = true
I have tried adding ‘AND IsActive = true’ to the Search Filter, so it reads 'CodeTypeID = ‘DrCrReason AND IsActive = true’ but that then returns and error that ‘IsActive’ must be an unabbreviated, quoted blah blah blah.
I’ve tried true and 1, neither works.
I’ve done this before, but I can’t seem to work it out.

It should be as simple as

CodeTypeID = 'DrCrReason' AND IsActive = true
1 Like

It should, but it’s not.
It doesn’t seem to like IsActive

Did you change the EpiDataSetMode from to “RowsDataSet”?

DataSetMode was already set to ‘RowsDataSet’ so I didn’t need to change it.


When I’ve used UserCodes, one of the main benefits I liked about it was that the business logic hid inactive codes, and I never had to do anything special with it. When you set this up, did you set up extended properties on whatever field you’re sourcing as this column to point the User Code, and then use an EpiCombo and let Epicor do the work for you in the customization? I’ve not had to code anything special, it automatically has hidden inactive user codes.


Well if I remember in E9 I could never use the = sign and always ended up using

CodeTypeID eq 'DrCrReason' AND IsActive eq 1
1 Like

@SimsTrak, good to hear from you!.
Yes, that is exactly what I did (Extended Properties, etc) and how I expected it to work, but for some reason it’s not. I assumed I must have been mistaken with E9 or something. They are upgrading to 9.05.702A this weekend so I was going to check and see if it works properly then, there are all kinds of really odd, small, annoying bugs in 605, like Customer Quick Searches not showing up as an example.

the ‘=’ sign is working ok, as the 'CodeTypeID = ‘DrCrReason’ auto populated when I created the EpiCombo and it’s filtering correctly. It’s almost like the GetRows/GetList Method/Adapter is no aware of the IsActive field.
Either way, they are upgrading to the latest version of E9 this weekend, and I suspect this might be some type of bug. I will follow up here next week, I hope.
Thanks Haso!

I know, but I never had luck when I used multiple, not sure why – always used eq, ne, gt, ge in 9.702A – or I just did it wrong.

The GetRows that this uses will only accept filters for the UDCodeType table. IsActive is on the UDCodes table and (as far as I know) can’t be filtered here. I’ve always used a BPM to filter it.

Ah, true - I forgot so the way I always did that was, there is a HiddenColumns Property I would add IsActive column

Then I would just make an event BeforeDropDown is Shown to hide the Non-Active ones.

private void epiComboC2_BeforeDropDown(object sender, System.ComponentModel.CancelEventArgs args)
  	// ** Place Event Handling Code Here **
	EpiDataView edv = oTrans.Factory("Contact");

private void cmbPartClass_BeforeDropDown(object sender, System.ComponentModel.CancelEventArgs args)
	// ** Place Event Handling Code Here **
	EpiDataView edv = oTrans.Factory("PODetail");

	// Reset Filters

	if (edv.dataView[edv.Row]["CalcTranType"].ToString().Equals("PUR-UKN"))
		cmbPartClass.Rows.ColumnFilters["ClassID"].FilterConditions.Add(FilterComparisionOperator.StartsWith, "R");

FYI: In E10 it looks like they auto remove the inactive UD Codes.