Data directive to check field value at specific time

,

Has Epicor put in a way to check a field value (and do something based on that value) at a specific time or do I still need to piggyback off a scheduled baq? Basically I want to check if the ActiveTrans field on the LaborHed table is true and send an email out to certain people with the EmployeeNum from those records.

you cannot schedule a BPM yet… I personally am still waiting for this feature too!

1 Like

Previously I have used a scheduled sql job to perform that sort of task that calls a stored procedure or straight TSQL to generate the email. Not fancy, but it gets the job done.

You could also do this with service connect on a schedule.

1 Like

just an idea i have done if you are interested in highlighting such transactions, which is creating a BAQ/dashboard refreshed each minute for active labor transaction with calculated field to count the difference between current time and clock in time and add this to the total of any previous transaction times (subquery) then compare that to the estimated time for production/setup transactions

1 Like

You may find this thread interesting.

1 Like

You could make a BAQ report and schedule it to be emailed at a certain time of day.

Just set the BAQ up so that if that condition (“check if the ActiveTrans field on the LaborHed table is true”) isn’t met you get no data returned. And a “No Records Selected” BAQ result will not result in an email.

Another option …
I use a PowerShell script (that runs DMT to update a UD table field), via a windows scheduled task. Then the DD tied to that UD table’s field fires at the same time everyday.

@ckrusen,
could you share any examples of these Epicor-PowerShell script ?

The following:

  1. creates a file c:\temp\trigger.csv (the single > overwrites an existing file)
  2. Adds two rows. One to set the monitored field, and another to reset it. (using the double >> appends to the file)
  3. Executes DMT.exe with command line parameters to update UD05
#DMT Automation Example 1

$DMTPath = "C:\Epicor\ERP10\LocalClients\MATCOR\DMT.exe"
$User = "_glbl_epicor"
$Pass = "PWfor_glbl_epicor"
$Source = "C:\Temp\trigger.csv"

#create the CSV file each time this is run
echo "Company,Key1,Key2,Key3,Key4,Key5,CheckBox20" > $Source
echo "MC,CKRU,,,,,1" >> $Source
echo "MC,CKRU,,,,,0" >> $Source


#Load Data
Start-Process -Wait -FilePath $DMTPath -ArgumentList "-NoUI -ConfigValue MATCOR -User $User -Pass $Pass -Update -Import UD05 -Source $Source "

EDIT

Since we use Windows endpoint, the user name and password are actually ignored, and the credentials of the windows task are used instead.

Here’s the Windows task (in Admin Tools Task Scheduler)

And here’s the Actions tab

Note, that this is all done on the App Server.

4 Likes