On the sales order form I am passing the partnum to a UD field via bpm. The problem is I would like to exclude the first 6 characters of the part number from passing to the UD field. How can I exclude the characters and filter the BAQ correctly? Should this value go in a UD field?
Maybe I am attacking this the wrong way.
What I am trying to accomplish: On a zone baq I am trying to show related parts to what was entered. If the entered part is out of stock, the zone baq can be used to show related parts in stock in different sizes. To do this I need to ignore the first 6 characters of the part num, which are size related values.
note that there is also a “Complimentary” part feature where you can add additional parts to the order. These features are not used as often as they could be.
in your BAQ you can use the MATCHES and CONTAINS expression to look for matches. Probably make that part into a sub-query with the top level being the specific part number you are looking for.
So after playing with this for while, one way that I figured out how to make that BAQ work is to make 2 subqueries, where they both have the part number, and a calculated field that removes the first 6 digits.
Something like this (just make #10 something longer than the longest part number you would have)
substring(Part.PartNum, 7 ,10 )
Then join by that calculated field in a top level. Add any other info you need into one of the one where you don’t filter the part number, and you should have all of the parts that match other than the first 6.
I thought about doing this…but were talking about a growing list of 8,000 parts that would have an alternate. I imagine mapping and maintaining this would be a nightmare.
It’s been a while since I’ve done a BAQ zone, so I would have to try one again, I thought that you pick one of the fields to filter by??? There has to be some way that it knows which field to look at.
Yeah, use the customization wizard to too add the zoneBAQ to the field. This an example of the code that will populate. I’m pretty sure you just need to make sure that your fields are “like” values are set. But I can’t remember for sure.
// Begin Wizard Added Conditional Block
if (edvJobHead.dataView.Table.Columns.Contains("JobNum"))
{
// Begin Wizard Added ExtendedProperty Settings: edvJobHead-JobNum
edvJobHead.dataView.Table.Columns["JobNum"].ExtendedProperties["ZoneBAQ"] = "JobBuildPrintsNoParams";
edvJobHead.dataView.Table.Columns["JobNum"].ExtendedProperties["ZoneSearchOnEmptyControl"] = false;
// End Wizard Added ExtendedProperty Settings: edvJobHead-JobNum
}
did you try to add the query to a customization yet?