I’m trying to customize the Report Quantity MES screen and I’m running into some odd behavior.
I have a field setup to capture information for CallContextBpmData.ShortChar01 that is then fed into a Method Directive BPM.
This works fine if I enter information into the ShortChar01 field first, then enter the other report quantity information. If I enter the current quantity, then enter data into ShortChar01, the method doesn’t fire.
I tried to explicitly set the RowMod to “A” when ShortChar01 changed, just in case it was resetting it. This had no effect. Typically I would solve the issue by creating a new UD field, however the dataviews used in Report Quantity screen don’t lend themselves to this well.
Anyone come across this behavior with Context variables before? Is there a way around it?
If I understand what you’re facing here, the problem is down to the use of the Method Directive and it’s acting the way it’s supposed to. The directive fires when the method is called. Changing a context variable doesn’t in itself call anything at all, it’s merely there to ferry data for use when it does fire.
If, as it sounds, you’re already combining customization with the BPM, then it is quite simple to get round - in your customization, you call that method after setting your context variable.
Not quite. I’m updating both the context variable and the dataset within the Method. The method is firing (or not) depending the order in which I populate the fields.
Enter ShortChar01, then LaborQty, Save - Method Fires
Enter LaborQty, then enter ShortChar01, Save - Method Does Not Fire
I tried resetting the RowMod back to “U” in the second scenario, but it still doesn’t fire.
That’s why I was suggesting manually coding the method call (save in this case), because the logic within a screen can be kind of impenetrable and it’s hard to be sure what’s happening when. Glad you got it sorted, though.
Yeah, Report Quantity is especially strange because it doesn’t really touch any tables directly, and its unclear what the OK button actually calls. Ended up making a new button that gets focus of the quantity field, then “clicks” the OK button.