So, a little stuck here. I’ve got an app where I’ve got a couple User Code Dropdowns assigned to TransView data. The first Drop Down is a type, and the VALUE of that drop down is the CodeID of the second drop down. So, I’ve got a CodeTypeID of “MYTYPES”, with user codes of “TYPE1”, “TYPE2”, “TYPE3”, and so on. Then, I’ve got CodeTypeID of TYPE1 with it’s values, CodeTypeID of TYPE2 with it’s values, and so on.
So, I’ve added the Combo Boxes, set as is documented well elsewhere. On the first drop down, it’s pretty basic, the FilterParams specify CodeTypeParam=MYTYPES and assign this to TransView.MyType. On the second one, I tried things like CodeTypeParam={TransView.MyType}. There’s a few problems. First, I can’t find the right syntax for this, my guess is I can’t use a variable here. Also, it appears this is getting set on the form being opened, and I haven’t figured out how to “refresh” it if the value changes.
I gave up on this, and thought I’d try building the reusable combo manually (also documented well here). So, I left the Reusable Combo blank, added the Ice.BO.UserCodesSvc and went the “get rows” route. I put the Search Filter with CodeTypeID=‘{TransView.MyType}’. I think this is working, but still can’t figure out how to get it to refresh when I change the CodeTypeID from one type to another.
If you scroll further down that article there is an example that seems pretty similar to what you are trying to do? It’s under Combo box > Setting up a Reusable Combo in this article:
Everything seems to work, but it doesn’t want to refresh my second drop down based on the value of the first one. I’ve got the first drop down bound to {TransView.ClassType}. I’ve got a text box on the screen along with the combo box, and I’m verifying that TransView.ClassType is holding the value I want. This value is the CodeTypeID of my second combo-box.
On the second combo box, I first tried using the reusable combo Type “UserCodes.UserCodesCombo”, the subtype is “default”, and the Filters Param is “CodeTypeParam=?{TransView.ClassType}”. When I change the value of TransView.ClassType, this combo-box never changes. I’m even clicking “refresh” on the combo-box, but nothing.
I also tried setting up the reusable combo. No matter what - can’t seem to get the drop down to refresh the source.
I didn’t see anything in the help about “refresh”. It seems like in their example when they tie it to a Customer, it should change as you change customers. I’m wondering if it’s because I’m going against TransView instead of a table. This was in an app created manually, and TransView wasn’t available. I added it manually (thanks Hannah for that post!). I’ve also noted that when I open this slider panel to get to this data, I had to add an “on create” to my combo-boxes with a “row-add” widget for the TransView table - otherwise it doesn’t seem to have that table initialized.
Since it seems like it’s running just one time, I would try to not fill in the Filters Params and instead use the Row Filter field (under Advanced) - this one gets all the data in the table and then filters after the fact.
Assuming you don’t have loads and loads of User Codes…
Thanks for all your help. Just not getting it to work, so I’m going a different route with this. I’ve spent too much time working on this already - time for Plan B.
I tried all the suggestions above. I just can’t seem to get the 2nd drop down to refresh when the field changes that drives it. The field is TransView.ClassType (ignore MyType - used that when I was trying to put out a generic example). My guess is that since TransView wasn’t available, this might just be a bug when creating an app from scratch. If I have time, I’ll try to put this into an Epicor provided app (such as Employee Entry) and see if it works there.