Guys i am working on a customization in the MES on the print tag menu and when i use assembly 0 the code work great but when i use assembly greater than 0 the totalqty is 0 can you guys help? the code is below
I’d start by verifying that ContextValue (as a whole) looks legit either with debugger or msgbox. Next I’d verify the job-asm-op combination is legit - E10 may be checking that. Other than that, the code looks fine.
I check it with textbox when i print before the for loop the data is good and for the if conditions in the loop option 0,1,2 works fine option 3 is the problem everything else is working great
Why not just pass ValueIn your list (or array if you choose) of strings and save the splitting part?
It is an object right?
Better yet create your own class and use in both sender and reciever
class MyParams
{
string job;
int asm;
int opr;
decimal qty;
}
var p = new MyParams();
p.job = "blah";
p.asm = 1;
etc
//in sender do
ContextValue = p;
//then in receiver do:
var p = (MyClass)MtlTagsForm.LaunchFormOptions.ContextValue;
p.Job... etc
Which makes me wonder…is qty actually an int, or is it a decimal?
This field will only have a value once a quantity has been reported and then it stays for the remainder of that active session. Did you possibly not report any quantity and thus it would be zero until you entered a quantity which would be after form load, at least the first time.