MES - Automatic Clock Out

Can you import the BAQ the BPM is inside. I wrote that before I had functions.

Awesome!

Seen this before?

That’s my custom loger you can use Ice.Diagnostics and replace the logging or remove those lines. It’s aptly named BetterLog, because it’s a better logger than Ice.Diagnostics. I blame @Bart_Elia that category specification in WriteEntry from Ice doesn’t work.

1 Like

Where does the Ice.Diagonostics log live?

Hi,

I manage this using the a BAQ import/ export powershell script that is scheduled to run @ 23.55 every night.

Fortunately, there is no night shift to deal with, as I am still not sure how Epicor expects you to run a shift across two calendar days.

Best Regards,

Andrew.

Using DMT or custom BAQ script?

I use the DMT.

I’m happy to post the script, if you want to give it a go.

Sounds like a plan…

Here is the script

CCClockOut.txt (2.2 KB)

The BAQ is very simple and queries the LaborHed table for records where the ‘ClockOutTime’ = 0.

The columns selected are

The calculated columns are:

  • Calculated_ClockOutTime - 23.98

  • Calculated_ActiveTrans - ‘false’

1 Like

What’s the name of your BAQ I couldn’t find it in your script to change it.

See below

@aclements

I’m getting this back… :confused:

I think the issue may be the line

$Env = “net.tcp://EPICORAPP/EpicorERP”

Just check the final double quotes is in fact shift-2

Just check all your double quotes

1 Like

Found the issue. :smiley:

Should this PS script clock emps out?

I can’t seem to get it to generate a csv file it’s just blank :confused:

Does the BAQ return rows when you run it manually?

It does return rows

Have you tried running it from the command line using the DMT example

start C:\Epicor\ERP10\DMT.exe -User=myuser -Pass=mypass -Export -BAQ="BAQClockOut" -Target="C:\temp\clockout.csv"

Hi Andrew,

Still bring back nothing unfortunately.

Maybe we can discuss this over Teams?

Kind regards,
Aaron.