Filling a textbox field from C# variable

I’m not sure how that would be done. Once we roll this customization out to the floor, we will tell employees to just end the operation with zero quantity if they clock into the wrong job/assembly/operation.

I tried doing this on a button click event on the issue material screen but unfortunately I have had no luck so far :frowning: . Seems to spit out the right information in the system message but wont go and update the field IM.ToJobNum :frowning:

private void btnSubmit_Click(object sender, System.EventArgs args)
{
// ** Place Event Handling Code Here **

	object barcodeFull = barcode.Text;		
	string bc = barcodeFull.ToString();
	// Split barcode into parts		
	var items = bc.Split('$');
	string job = items[0];
	string asm = items[1];
	string opr = items[2];
	
	MessageBox.Show("Job =" + job + " Asm=" + asm +" Op=" + opr );

	var view = ((EpiDataView)(this.oTrans.EpiDataViews["IM"]));
	if(view.Row>=0)

{

		// Fill Job Number
		view.dataView[view.Row].BeginEdit();
		view.dataView[view.Row]["ToJobNum"]=job;
		view.dataView[view.Row].EndEdit();

}}}

Hi ridgea, have you ever found a solution?
edited:
I ended up using the split method @ the MES screen and setting ValueIn to the index I wanted to. I also passed the barcode into ContextValue.

Hello Guys Just reaced here in search on Something relateable.

Is it possible on a button click it should open a Camera to Scan Barcode and fix in textbox ?

Can Someone Guide me here please.

Thanks
Saif.

Sure, start a new thread and post all the details.

1 Like