Тема: Work fielcustom driver's
HOW TO WORK WITH DRIVER custom fields ?
NEED display them on screen ...
USE JAVA SCRIPT + HML
Вы не вошли. Пожалуйста, войдите или зарегистрируйтесь.
HOW TO WORK WITH DRIVER custom fields ?
NEED display them on screen ...
USE JAVA SCRIPT + HML
See parameter jp here http://sdk.wialon.com/wiki/en/sidebar/r … ate_driver
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 ) ?
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"
How to display custom fields drivers ?
I managed to create custom fields, but does not display the custom fields.
Attached image.
То 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]);
}
}
}