MES FKV to show operation comment text

I was suggesting using the epiviewnotification event (from the wizard, on the edv in question)

private void edvPart_EpiViewNotification(EpiDataView view, EpiNotifyArgs args)
	{
		// ** Argument Properties and Uses **
		// view.dataView[args.Row]["FieldName"]
		// args.Row, args.Column, args.Sender, args.NotifyType
		// NotifyType.Initialize, NotifyType.AddRow, NotifyType.DeleteRow, NotifyType.InitLastView, NotifyType.InitAndResetTreeNodes
		if ((args.NotifyType == EpiTransaction.NotifyType.AddRow))
		{
			if ((args.Row = 0))
			{
					//Do your stuff
			}
		}
	}

Sorry late to party on this one but what is it specifically that you are trying to achieve Fred as I had to do something similar.

Our scenario we wanted the comment text to appear on screen and require clicking ok when the operator logged into the specific operation - does this every time they log into the op for that job - if there is no operation nothing displays and for certain ops where we do mass clock ins (cutting ops) it does not display. We also display the next operation when clocking the op off. We use this for when parts are sent ahead without the route card only a sticker flagging the job. Our shop folks also lose route cards - this enables them to still see specific comments.

My code is pretty brutal and uses standard Epicor text boxes but it might meet your needs.

That’s what I set up, but it wasn’t working so I was doing a check to see how many rows it was counting.

if ((args.NotifyType == EpiTransaction.NotifyType.AddRow))
{
    if ((args.Row == 0))
    {
        var view2 = ((EpiDataView)(this.oTrans.EpiDataViews["LaborDtl"]));
        if (view2.dataView.Count == 1)
	    {
	        //Code to display CommentText
	    }
    }
}

James, what I’m trying to do is show the comment text for the selected job/assembly/operation on the MES main menu.

Do you maybe need to have a duplication of the code so runs on form load, and then runs again when the row changes?

I don’t think it will work on form load, because on form load the employee has not yet clocked in so the DataView is empty.

I stumbled upon this thread, and now it works! I just needed to change the notify type to Initialize instead of AddRow.

So the final solution uses two cases; one to check when the dataview initializes (fires when a user logs in and is already clocked in to a job, and also fires when a user clocks on to a job having no other jobs clocked in), and another to check when a user is going between different clocked in jobs.

Thank you everyone for your help in getting this one resolved!

1 Like