jaket
Posts: 9
Joined: Mon Sep 04, 2017 1:37 pm

JobComplete - Notify via Email or SMS

Mon Oct 16, 2017 5:26 pm

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

Return to “GpsGate for Developers”