Dynamic List Items in Order Entry Customization

Oh sorry, I think I understand what you’re saying now. I think Ben’s suggestion is what I would do because it would be tightly coupled with the source data.

Hi Caleb,
I think you are complicating yourself a bit, here is what recommend.
Add 1 Set of UD Codes for your Sales Category
Then create another UDCode for the subcategory and make the “LongDescription” match the “Parent” category
Then you should be able to use my Video to do the filtering with no problem

  1. Create a User Code called SalesCat which has codes
    Fundraisers,
    Concessions,
    Other
    image
  2. Create a User Code called SalesSubCat which has alll the subcategories (individually not tilde separated)
    make the Long Description for each of these = to the SalesCat they match to Above

Then use the video to filter by the “LongDesc” (include it in the HiddenAppendRows and use the same technique in my video to pass in the filter from the other combobox

3 Likes

You should create one code for each subcategory that’s the propper way to do it

-Jose

You can paste insert from excel

-Jose

Caleb I would say to go for UD codes as per Jose recommendation. I’ve used this method a few times, will post some screenshots later. Possible to do without custom code.

You want the UD codes separated out, means it will be easier to add and remove them in future and also when the combo value is stored in a field on your record, you want have to parse the tilde delimited list to get the value as you already have it.

Jose,

I have the default Sales Cat combo box pulling off of the UD code SalesCat as shown here:
image image

Now I’m trying to get the custom combo box to filter off that info but I can’t seem to get the correct syntax/order down.

So here’s my Sales Category combo info:

And
Here’s the Sales Sub Category Custom combo info:

Within the epiFiltersAppend I have “CodeDesc = ‘?[SalesCatId, 0]’” but I’m getting the error that this isn’t a valid column. If I change it to LongDesc I don’t get any errors but then the combo box comes up as blank.

For your post (#15) you show that I need my Descriptions to matchup with the actual sales codes, but I wanted to say that I’m not using FullDescription for that, I’m using just the Description field.
See -

What am I doing wrong here?

In your filter condition, check the capitilisation – should be SalesCatID not SalesCatId. Also, if that doesn’t work then try OrderDtl.SalesCatID

Regards
Mark

Thanks Mark. Unfortunately neither of those worked. I’ll keep messing with it…

I find it odd that LongDesc is a valid column, but CodeDesc isn’t.

Add CodeDesc to the EpiHiddenColumnsAppend property so that it is included in the returned data :slight_smile:
http://jcg.pictures/gdgfajhi4sEja.png

It’s in there.

Also add it to the EpiColumns Property…

Both LineDesc and CodeDesc are in the EpiColumns property.

Here’s the error I’m getting:

image

Now before I go any further let me give you ALL the info since I might have changed a few things from the time I posted my earlier question -

Original Sales Cat Field data:

Now the Sales Sub Category Field:

  • Bound to OrderDtl.SalesSubCatID_c
  • BO = UserCodes
  • EpiColumns = LongDesc and CodeDesc
  • EpiHiddenColumns = CodeDesc
  • EpiFiltersAppend = CodeDesc = '?[SalesCatID, 0]'
    Anything else can be seen here:

I cannot figure out how or why “LongDesc” is a valid column and “CodeDesc” isn’t… It doesn’t make much sense to me at all… Any ideas?

Bump ^^ - Any help would be appreciated.

Just a thought, I’m not an expert, but try replacing
EpiFiltersAppend = CodeDesc = ‘?[SalesCatID, 0]’
with
EpiFilters = CodeDesc=’?[SalesCatID,’’]’

Sorry Caleb,
Was on Vacation I’ll take a look tomorrow.

No problem at all Jose.

I’ll be looking forward to it

Do you think this is possible to do?

Right now I have the Sales Sub Cat user codes like this - image (description = SalesCat)

Sales Cat user codes -
image

Hello Caleb,

Solution is here follow following steps.

  1. Add a child table to Sales Category for Sub Category(design a sheet based on your input.)
    2 Insert Sub Category Combo Box(EpicCombo) on order Screen.
    3 Get Values after Field Change Event of Sales Category and Pass to your Child UD adapter and bind datasource to your Custom Epic Combo.

Let me know if you need source code of this solution.

Thanks
Surendra Pal

Caleb,
Finally got it, what a pain! So the reason you can’t use the CodeDesc is because the whereClause is passed to the CodeHeader table not the CodeList table. So that field doesn’t exist. However I found a work around with the same principle.
Remove the filters on the SubCategoryDropDown (so they all show). Still return your LongDesc, CodeDesc and CodeID as previous

This time use the Wizards -> Event Wizard-> Before DropDown Event on your SubCat Combo

the following 3 lines of code will add a dynamic filter to the SubCatCombo based on the SelectedValue of the SalesCombo. Note I used the EpiDataView CAllContextBPMData you’ll have to change it to whatever DataView you are binding your combo to.

private void epiComboC2_BeforeDropDown(object sender, System.ComponentModel.CancelEventArgs args)
	{
		// ** Place Event Handling Code Here **
		EpiDataView edv = oTrans.Factory("CallContextBpmData");
		epiComboC2.Rows.ColumnFilters["CodeDesc"].FilterConditions.Clear();
		epiComboC2.Rows.ColumnFilters["CodeDesc"].FilterConditions.Add(Infragistics.Win.UltraWinGrid.FilterComparisionOperator.Contains,(string)edv.dataView[edv.Row]["Character01"]);
	}

image

Works great

4 Likes