Assign initial value to CallContextBpmData.Number01

What’s the best way to assign an initial value to a BPMData field in a screen customization?

I’m using CallContextBpmData.Number01 during Inspection Processing to hold the number to labels the user wants to print. Then use that value in a data method BPM. I’ve got the BPM working, however, Number01 equals ZERO by default and I want the default to be 1?

I tried the following code but not sure what event to use. Or maybe the codes just wrong…

EpiDataView edvBpmData = (EpiDataView)oTrans.EpiDataViews["callContextBpmData"];
int QtyLbls = Convert.ToInt32(edvBpmData.dataView[edvBpmData.Row]["Number01"]);
QtyLbls = 1;

You’re creating a QtyLbls variable from the ccNumber01 value and then you’re setting that variable. After creating that variable, the two are unrelated entirely.
You want to set ccNumber01 directly.
edvBpmData.dataView[edvBpmData.Row]["Number01"] = 1;

1 Like

it must be Friday… how could I have missed that, duh!

now to figure out which event to put it on…

Is there a reason you’re not doing it BPM side? Might be a little easier and then you could use a built in BPM data form to capture the # of labels needed

Was try to streamline it and not have another window popup to have to enter data into. On RcvDtl, I added an UDfield, however in Inspection Processing there are only views referenced not tables.

I think this is working, now. I ended up putting the code under Form_Load & BeforeRowChange.

1 Like