Script Editor - MES Customization Calculation

Hi,

Very old topic, but I have got the same task, to show RunQty, QtyCompleted and QtyDifference under end activity. So I want to share how I am thinking to solve this. As always intresting to hear opinion from experts.

So I would add three numeric fields, RunQty, QtyCompleted and RemainQty.:

Since I can not find RunQty and QtyCompleted under data view, I would add new JobOper data view:

Then I would epibind RunQty and QtyCompleted to the numeric boxes.
Then I would use Form Event Wizard and would pick Load type and add additional script which would take RunQty and QtyCompleted from dataview and I would store them to variables “RunQty” and “QtyCompleted” then I would take away QtyCompleted from RunQty and I would assign the result to the RemainQty numericbox which has no apibinding:

The result would be:

Justas,
Thank you for this addition to this thread! Very helpful!
I was wondering if you have the same slowness problem that I have. It seems that adding the JobOpper data view slows opening up the end labor activity screen.
The only thing you didn’t show was adding the Foreign Key Value in the custom data dialog screen. I tied the FKV to JobNum but I’m wondering what you tied yours to…

image