Posts: 4
Joined: Fri Aug 04, 2017 8:34 am

Re: GUDIE: Multiple events per event rule and device.

Thu Nov 01, 2018 7:39 am

Is it possible to start/stop one more event after the following condition?

if(speed > 120)
context.setVariable('Severity', 'Supet Fast', 's3');
-> start_event(" speed violation 120")_here;
->stop_event(" speed violation 120")_here;

Posts: 2
Joined: Tue Jan 30, 2018 11:34 am
Contact: Website

Re: RE: GUDIE: Multiple events per event rule and device.

Wed Dec 19, 2018 11:43 am

Hi Alon,

The variables you set via Script Expression are not visible in the list of available messages but you can use them. Just use the variable name with square brackets (in your case this is [Tags]).

Please note that "session.user.getTags" function returns an array of Tag objects, while "context.setVariable" function requires string parameters. You can try to concatenate tag names and pass it to notifiers by making a call to "context.setVariable". see full extenze reviews here

I would recommend the following approach:

Code: Select all

// Get user tags 
var arrUserTags = session.user.getTags();
var arrUserTagNames = [];

// Insert user tag names into a new array
for (var i = 0; i < arrUserTags.length; i++) {

// Concatenate tag names with comma and set variable
var strUserTags = arrUserTagNames.join(',');
context.setVariable('Tags', strUserTags);
return false;
Then you can go ahead with using variable label [Tags] in the argument notifier.


GpsGate Support
And then you use context.setVariable to set the Report arguments ??

Return to “GpsGate for Developers”