Help Creating a BPM to filter out attachment doc types where DocType.Description begins with an *

I’m looking for help to filter out the Doc Type dropdown menu off of Case Entry > Attachments. I have been trying to learn how to do this correctly and can’t figure it out.

I think a pre-processing Method Directive is what I can use, and I’ve done the trace logging to find the Ice.DocType.GetRows that I believe is being called when the user clicks the New button on Case Entry > Attachments. But from there I can’t get it right. I’m in the BPM Workflow Designer now, and I’m not sure which widget to use to accomplish this.

Right now, I’ve got Invoke BO Method up and I was thinking I could filter the where clause from in here maybe on line 1 or 5? But honestly, I am guessing. Can someone point me in the right direction, please, for this exact issue? I’ve read all the user guides and taken the ELC courses, but I’m not finding anything close enough to this example to mimic.

You might try setting the whereClausDocType parameter to a statement, much like SQL. I do something similar in a BPM to exclude certain results from the method return. My example is a little straightforward, but you might find some inspiration from it.

1 Like

Aaron, thanks so much! I will start there using what you posted. :slight_smile:

1 Like

Where can I find explanations for all the BO methods? For example, Ice.BO.DocType has GetList and GetRows that sound similar. Where do you find the meat inside the methods?

Hey. GetList and GetRows are often called when generating lists and rows of that data, such as if it’s called from a search or something. In your use case, it’s very likely that getlist is being called, but not always going to be.
Putting the BPM in place on both GetList and GetRows is a pretty solid way to make sure that you are indeed excluding those results from those method calls, however you will of course need to do some investigation.
You are probably not going to find the “meat” of those methods anywhere, as they are sort of self describing by their name. A more complex method might have an associated explanation but I’d seriously doubt to see it for those.

Just a guess, but I’d think that GetList is used for a list (think 1 dimensional array), while GetRows fetches rows with multiple columns per row.

One word of caution on a BPM to filter rows (or lists) is that the method is probably called from many different places in E10.

For example, say you make a BPM to filter out ProdGrp’s that begin with ‘Z’ so they cant be selected on an order or Part entry. If you don’t check to see what called it (or which user) you’d not even see them in ProdGrp Maintenace. There’d be no way (without disabling the BPM) to rename that ProdGrp to re-enable it.

Great replies, thank you both. I was trying both directives yesterday, so I’ll continue with that today. And I realized that the method is called from many places, but I don’t know how to check what called it, so I’ll try to find out how to do that today. If anyone has an example handy, I’d appreciate it, otherwise I’ll just search and see what I can find. My goal is to figure this out today.

@Erin_Corona callContextClient.AssemblyName is the calling assembly.

callContextClient.Customization can be used if the calling program is on them menu a bunch but you only want one menu item to be trigger it.

Thanks, Greg, I’ll check that out.

After two days of tinkering with this, still the best I was able to do was to filter the DocTypes from the Document Type Maintenance form Search button. I need to filter the doc types from attachments added to HDCase. I don’t see what I’m missing in the trace logs, but I’m using the wrong method. I’ve put in a message box in all of the methods that I saw in the log, just to try to help me find the right one, but none of them pop in Case Entry, and the Ice.BO.DocTypes.GetRows only works on DocTypeMaint.

In the trace log, I’ve checked off: Enable Trace Logging, Write Full DataSet, Write Call Context DataSet, and Write Response Data.

What am I doing wrong? How is it possible that if I turn on that trace, and then open case entry, put in a case num and tab out, click on Attachments icon, click on New button on Attachments tab, (when dialog displays) click on Type button to select doc type - attach a file, and stop logging – that none of those methods’ message boxes appear?

This is such a simple thing - why is it so hard?! I don’t know how to get it working, if anyone has a suggestion I’m open to all suggestions.

1 Like

I finally figured it out!! Super excited. Will post last update soon. Couldn’t have done it without you, @ckrusen!!! :star_struck: :smiling_face_with_three_hearts: :stuck_out_tongue:

FINAL: So happy that I got this finished and a guideline all written up to remind me and/or my partner in the future. For anyone who might be interested, here’s how we did it.

  1. Created a Method Directive on Ice.BO.DocType.GetList.
  2. Used the Set Argument/Variable widget with the whereclause = “Description < ‘ZZZ*’”
  3. For all the doc types I wanted removed, I added “ZZZ_” to the beginning of their descriptions.

This turned out to be much easier than I thought. We had it right on the first day, but it turned out to be a caching issue, so when I was testing it, it didn’t do anything, and I thought I had the wrong method. Once I cleared my cache and logged back in, voila - it worked! Too bad that was cough 3 days later. Smh. But - that was a valuable lesson I won’t soon forget. :slight_smile: Thanks to everyone for their input.