Page 1 of 1

JobComplete - Notify via Email or SMS

Posted: Mon Oct 16, 2017 5:26 pm
by jaket
The most simple solution is to use the job expression in the event rule. Email and SMS can be triggered whenever entering the specified zone (e.g. 50m) encircling the job.

This will then make a trigger to email or SMS to the specific user or email/number.

Code: Select all

var workersActiveJobs = dispatch.getActiveJobs(session.user.id);
if (workersActiveJobs.length != 0) {
  for (var i = 0; i < workersActiveJobs.length; i++) {
    if (trackPoint.position.distance(workersActiveJobs<i>.position) < =50) {
      return true;
    }
  }
} else {
  return false;
}
-------------------------------------------
Image
Expressions -

Only option I have is Event Rules

Inside of here I don't have an option for Script Expressions/Editor

Explain where I would put this?


http://gpsgate.com/blogComment/apps_and_auto_completion_of_jobs