Add Column to Search, or Create a New Search

Good morning,
I am looking at the Customer Shipment Entry form. When I create a new pack, choose an order, then add a line to the pack, I have to click on the “Line/Rel” search box in the Lines tab. This brings up a search box to allow the user to choose a line/release for the pack. We need to see an additional field in this list: OrderDtl.CustomerXRev. I would prefer to just add this field right to the base search. But it doesn’t seem possible. It looks like the BO is “OrderRelSearch”.

How can I create an identical search to OrderRelSeach, and add the OrderDtl.CustomerXRev field to it? I think I can set that as the default search once I can create the BAQ.

There are two main problems I can’t figure out.

  1. The “OrderRelSearch” takes in a where clause that include the order number. How can I pass that order number from the Customer Shipment Entry to the BAQ?

  2. The “OrderRelSearrch” returns two fields to Customer Shipment Entry. The Order Line, and the Order Release. How can I make my BAQ return those values to the Customer Shipment Entry form?

I would prefer not to customize the form, and just work on a better search.
What’s the best way to make this happen?
Thanks for your time!
Nate

EDIT: Apparently I already asked this question once before. Linking here for reference:

Since that base search returns more than one field, (as far as I know) you’ll need to do some customizing.

A bit if a hack … How about using a BPM to replace the value in one of the native columns with your desired column. The returned data would still have the column name of the original field. As long as you don’t change the key fields returned by the search

That is an interesting idea! How would a BPM access the Results in that search window?

There’s a BO Method that is called in order to get those results. A post Proc BPM could use a Update table by Query widget to alter the data that the method retrieves.

This assumes that altering that data happens after it is fetched, but before it is sent to the form.

If I had access to an E10 system, I’d try it out for you. But I don’t. :frowning:

One last thing, this would affect the data on any search form that uses that BPM - unless you did something to identify the source calling the method. Maybe something in the CallContextBPMData would work.

My trace reveals this method:
Erp.Proxy.BO.OrderRelSearchImpl.GetListFilterShipped()

I don’t mind so much if this affects other searches, as I am only adding a field that everyone would find useful (in our company). I will dig into this idea a little more.
Thanks for your time, Calvin!
Nate

Look at the following post (not the whole topic). It shows using the Update Table by Query widget

Edit:

This link is a better example.

I like this approach, and I can see it almost working in my returned message box. However, When I run the Line/Rev search, the standard search results do not have any string fields that I could replace with my CustomerXRev field. Is there anyway to insert a column into a search result with this post-proc method directive?

I’m not sure. When you’re in the Set Table Mapping screen in the BPM, can you add a row to the bottom of the table set?

And just curious, what columns are in the original table?

And what BO Method are you using?

And to your original questions on a BAQ search … When the search returns multiple keys (like OrderLine and OrderRelNum), the BAQ needs to return the SysRowID (I think) for the OrderRel record (that specify a specific OrderLine and OrderRelNum). There are some topics on here with regards to that. If I can find one, I’ll post it.

Edit:

see:

See point #2 in that link

Erp.BO.OrderRelSearch.GetListFilterShipped

These are the columns in the original search results.
Line Order, Release, Ship By, Part Number, Firm Rel, Our Release Qty, Our Job Shipped Qty, Our Stock Shipped Qty, Our Job Qty, Our Pull Qty, UM

You could replace the original Part Number value with an expression that combines your P/N and the customers P/N. Like if your P/N was ABC-123, and the CustomerXRev was 1289-8789789-YZ make the PartNum column display:

ABC-123 (1289-8789789-YZ)

It would only ever be just for show in the search window. When you select the row in the search, I’m pretty sure the only info passed to the form is the OrderNum, OrdeLine, and OrderRelNum. All the other info is probably fetched based on those three keys. But obviously test that out.

1 Like

That is a great idea! I’ll give it a shot.

This worked like a charm!!! Thank you so much!