How clear embedded dashboard in MES on log out

,

Hello everyone,
I have a custom sheet in MES that displays the results of a BAQ that looks at the hours a person worked. It subscribes to empbasic.empID. Right now it displays the correct result but the issue is that it does not clear the grid when you clock out or log out. The rest of MES clears but the grid shows the most previous results until another person clocks in.

I think the solution has to do with putting an oTrans.RefreshLaborData(); or oTrans.ClearDataSets(); somewhere in the code but I do not know where to put it. I would like it to clear the data upon pressing log out or clock out.

Is there a better method to tell an MES user how many hours they have worked? Maybe a button that brings up a pop-up box?

Hello,

I do not have an exact answer but maybe my babbling can get you in the right direction.

The quickest, easiest way I can think of is a 3 step process:
#1 Add an event to the employee field (either the epiDataView or the actual textbox control) to fire on change
#2 Use a BAQ (which you probably already have driving your dashboard)
#3 On the event in #1, call your BAQ from code passing the EMP as a parameter.

1 Like

I could not make an event on the employee field because it is not a custom control so it does not show in the drop down menu.

I tried following all of the steps in the video to make a button that pulls a persons labor hours and everything seems to work. It compiled with no errors but if I close and reopen the customization it gives me a compilation error, removes the extra tabs I added and unhides all of the tabs I have hidden. I have tried this three times but every time I have to go back to the beginning.
I must be doing something very wrong.

Did you add the DLL using the wizard (DynamicQueryAdapter)?

Did you add using Ice.BO; at top of script?