Script Expressions: development tips
These general guidelines will make your script development faster and more stable.
- Write down all Use Cases you want your script to support. Write down each case step by step. Once you have developed your script, make sure you test all Use Cases.
- Create a test application. Always make your development in a separate test application and not in the customer application. The test application can also be on a different server.
- Use the Test Script function you have in the editor to test your script. You can set variable and track point inputs in the editor. Geofences, POIs, custom fields, etc. will be taken from the selected user.
- Use the log() function to log to the Terminal or the App Console.
- Inside POI (link)
- Geofence rule that checks if a vehicle is inside a geofence named by a custom field. (link).
- Multiple events per event rule and device. Set Notifier variables from script. (link)
- Trip & Idle scripted report. (link)
- 5 km gap without position updates. (link)
- Distance between POIs (customer sites). (link).
- Create fatigue alerts with scripting. (link).
- Guide: Allow users to select Event Rules using Custom Fields with scripting. (link)
- Guide: Notifier variables. (link)
- Guide: Driver Login Report. (link)
- Using the Simulator for testing
- Export the event rule from the test application and import it into the customer application.