MES - Automatic Clock Out

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.