Filtering the ShipTo combo using a UD field (active/inactive)


I was asked to add a bit flag to indicate an inactive ShipTo. I have created the UD field InActive_c in ShipTo table.

I added the checkbox into the CustomerEntry Form.

So far all is ok.

My goal was to not show the inactive shiptonum when user clicks on a shipTosearch button. I then created a BPM on ShipTo GetList. In the PostProcess I added the Set Argument widget. I then set the whereClause argument to “ttShipToListRow.UDField<System.Boolean>(‘Inactive_c’) = 0”

I checked inactive two shipto’s of my test customer, saved.
When I created a new sales order, I would have expected the shipto not having the two “inactive” adresses… But they are still present in the list…

What am I doing wrong ?



Did you try this? Preprocessing with setting the argument via sql-like syntax string


I did …

my string was “Inactive_c = 0”

and the result was… 969 shipto’s (all ) instead of 35, the customer’s ones.

as if by modifying the whereclause, I had to add the actual Custnum… but in Preprocess got the error indicating to me it was not set…

though, adding the ZZInactive at the end of the name, heck ! worked… Ben bizarre!!!

I might do at the end, as soon as it is checked, upon saving, I will add ZZInactive to the name…:thinking::roll_eyes:

Ok ended up doing the following:
Data directive that as soon as my Inactive check box is saved, I add ZZInactive at the beginning of the name.
In Sales order entry, clicking on the Shipto button and searching… I can see the inactive at the end of the list. (still unable to use the GetList preprocess… to remove them… )

If by mistake they choose an inactive adress I show a message to the user to choose another, and revert back to the original adress.

That is it.

But I am still wandering why the getlist way did not work… would have been much simpler…

Thanks all for your input.

Do this and use a pre-processing. The whereClause was not empty when you changed it and thus removed the CustNum filter that is there by default (that is why you got all the Ship Tos)

  1. Create condition widget to check for whereClause = null
  2. Set the whereClause, as shown below, for each path of the condition


Here’s an example of how we do this for “inactive” Product Groups.

  • The PrdGrp table has a UD field AllowUsage_c

A Pre-Proc BPM for Erp.ProdGrup.GetList consists of:


With the Set Argument expression

"ProdGrup.AllowUsage_c=TRUE " 
+ (whereClause ==  null ? "" : " AND " + whereClause)

Then anywhere that a user has a list of Prod Groups to choose from, they see:

And this doesn’t prevent you from selecting them in Product Group Maintenance


Dan your the man! It worked! I actually tought it was the issue, and tried to add Custnum from the available rows objects… but it was not working giving me errors…

But your trick worked for me!!!



1 Like