Application Studio - Adding New Filter on Material Queue Manager

Hello, within application studio on Material Queue Manager I have added a new ‘Demand Type’ dropdown which I would like for it to look at a UD field on the material queue for the values, and filter the gridview.

In the Data EpiBinding fields I am setting EpBinding to FilterControlView.DemandType_c

EpBinding Text Column
DemandType_c

image

How can I get it to list the values and filter the grid ?

Can anyone help ?

Hi Emma. Where are the values that would populate the dropdown stored? Did you create a list of values in UserCodes, for example?

Hi, thank you so much for your reply. Yes, I can put them as a usercode the problem I have is I have no idea how to filter the lower grid once I have done that :slight_smile:

CRAP… APOLOGIES… I wrote up this up and then realized I was answering a completely different scenario (which in my head you had asked about). So… I won’t delete this post, incase it is helpful in other cases… but it won’t answer your question completely. The post below details how to use one combobox to populate a second combobox. The first half of this, I suppose, still applies to what you need. It gives details on setting up a ComboBox to query a UserCode. Just ignore the bottom portion.


Okay… its been awhile since I set this up, but hopefully the below captures what you need.

In this example, my user is logging external drawings (not originating from our company) against a part record. The user must first select a “Source Type” (Dropdown #1)… that selection filters the result for “Source Code” (Dropdown #2).

My first dropdown is bound to a dataview called UD02_View and then column ShortChar19… so that binding is UD02_View.ShortChar19

You then have to set up the Reusable Combo. There is a default in Epicor for UserCodes.UserCodesCombo

In the bottom section of this setup, you can add your Filter Params

In my case the UserCode (Code Type ID) I wanted to use was DWG_Source
image

This results in my fist dropdown displaying like this:
image

Note that it is actually displaying the CodeDesc of each UserCode… not the Code itself (C, I, M, N, O, S). This is the result of using the “default” subtype of your UserCodeCombo.

image

If you look in the Advanced area, you can see that it is looking at the Value Field of the CodeID… but it is returning the CodeDesc of that User Code.

If you want to show the CodeID itself (for example)… you’ll want to delete the “default” option at the top in the subtype field… and then you can rebuild the combobox setting manually. Most will be the same as the default. But then, here in Advanced, you can set both Value Field and TextField = CodeID.

Okay… so… test and verify that your Combobox #1 is getting you the list of results you want.


Combobox #2:

Set up largely the same way. I have this one bound to UD02_View.ShortChar20

In my case, I still chose the standard UserCodesCombo & default subtype

image

The only difference is the Filters Params. In this case, I want to filter this second combobox by whatever was selected in the first combobox. So my filter params is: CodeTypeParam=?[ShortChar19]

Make sense?
My ComboBox #1 is set up to query UserCodes, and is filtered by a distinct UserCode (DWG_Source). That selection was bound to ShortChar19.

My ComboBox #2 is set up to query UserCodes, but it is being filtered by whatever value is being held in ShortChar19.

Here are my UserCodes:
image

So, the DWG_Source was ComboBox #1. The user selects “C” (Customer… in our world that means this drawing was given to us by a customer).

ComboxBox #2 should now show a list of all customer UserCodes that I set up under CodeType “C”. Again, showing the CodeDesc (which in this case is the Customer’s Name… so, I need to redact, haha).

Give it a shot and let me know if you have any hang-ups.

Okay… to filter the grid…

QUESTION… you added a UD Column called DemandType_c

What table did you add that column to? MtlQueue?

I can’t really “test” this because I don’t have any UD fields set-up. My thought is… on the ComboBox, set the EpiBinding to TransView.DemandType_c.

The ComboBox (set up as described in the above post) should allow you to select a value from your UserCodes. The selected value will then be saved in TransView.DemandType_c

Then, click on your grid… navigate: Data > Grid Model > Provider Model

Epicor has an area for “Client Filter” which is supposed to allow us to filter the returned results… but I couldn’t get it to work.

Instead… I did have some success in adding a Where Clause to the Rest Params… so let’s try that. Click on the edit/pencil.

I tested by adding a whereClause to filter by TranType… and it worked:

So… I would try the below whereClause and see if it works:

image

1 Like

Hey, thank you so much for this, it’s very very helpful. I am getting an error on the grid but will explain where I am at.

  1. I have created the dropdown which pulls back the user codes successfully and also changed the EpiBinding to TransView.DemandType_c

  1. On the grid I have gone into grid model > provider model and edited the rest params to include “whereClause”: “DemandType_c = ??{TransView.DemandType_c}”

  1. When I preview I get sorry! something went wrong. Please contact your system administrator.

DemandType_c UD field is on the MtlQueue table but it is not included as a default field on the grid. I dont know if this matters.

Hi Emma,

Could you try wrapping it within single quotes, for example:

“whereClause”: “DemandType_c = ‘??{TransView.DemandType_c}’”

If that does not work then you might need to hit F12 to see what is going on within the console / network response which might provide a more meaningful error.

1 Like

Just the job !
I also added the column DemandType_c into the TransView Data View to make it visible on the grid.

Thank You!

Nice catch, Neil. I was close, but always get tripped up by when/where to use single quotes, double quotes… one of these days I’ll get it down!

Thanks for your help!

2 Likes

Thanks so much for your help, really appreciated !