1

Work fielcustom driver's

Topic: Work fielcustom driver's

HOW TO WORK WITH DRIVER custom fields ?

NEED display them on screen ...

USE JAVA SCRIPT + HML

2

Work fielcustom driver's

Re: Work fielcustom driver's

See parameter jp here http://sdk.wialon.com/wiki/en/sidebar/r … ate_driver

Head of Wialon Local Department
Gurtam
3

Work fielcustom driver's

Re: Work fielcustom driver's

thanks for the help , I managed to visualize the first fields , but can not see the custom , which is done with the parameter " jp" , what is the structure for this parameter (jp ) ?

4

Work fielcustom driver's

Re: Work fielcustom driver's

Analista_Jose wrote:

thanks for the help , I managed to visualize the first fields , but can not see the custom , which is done with the parameter " jp" , what is the structure for this parameter (jp ) ?

parameter 'jp' has text format  - name: value
for example , "vehicle":"truck"

Diana Cheley
Wialon Hosting Expert
Gurtam
5

Work fielcustom driver's

Re: Work fielcustom driver's

How to display custom fields drivers ?

I managed to create custom fields, but does not display the custom fields.

Attached image.

  • Work fielcustom driver's
  • Work fielcustom driver's
6

Work fielcustom driver's

(edited by deal 15/01/2016 18:25:53)

Re: Work fielcustom driver's

То print all drivers' custom fields You can execute such code in Your browser's console:

var resourceId = 555;
var driverId = 999;
var resource = wialon.core.Session.getInstance().getItem(resourceId);
if (resource) {
    var driver = resource.getDriver(driverId);
    if (driver && typeof driver.jp != "undefined") {
        for (var key in driver.jp) {
            console.log("driver field", key, driver.jp[key]);
        }
    }
}
Head of Wialon Local Department
Gurtam