Script en lista del dash board
var pel = IIF(IsEmpty($datapoint.peloton),'', ($datapoint.peloton));
var sec = IIF(IsEmpty($datapoint.peloton),'', ($datapoint.peloton));
var esc = IIF(IsEmpty($datapoint.peloton),'', ($datapoint.peloton));
var eq = IIF(IsEmpty($datapoint.peloton),'', ($datapoint.peloton));
var tol = '';
var tol_1 = ($datapoint.division);
var tol_2 = ($datapoint.brigada);
var tol_3 = ($datapoint.batallon);
var tol_4 = ($datapoint.compania);
IF($datapoint.peloton >= 0 && $datapoint.peloton <= 9)
{pel = ($datapoint.peloton)}
else if ($datapoint.peloton >= 10 && $datapoint.peloton <= 99)
{sec = ($datapoint.peloton)}
else if ($datapoint.peloton >= 100 && $datapoint.peloton <= 999)
{esc = ($datapoint.peloton)}
else {eq = ($datapoint.peloton)}
tol = Round(abs(Sum ((pel) + (sec/2) + (esc/3) + (eq/4))))
return {
textColor: '',
backgroundColor: '',
separatorColor:'',
selectionColor: '',
selectionTextColor: '',
attributes: {
pel : pel,
sec : sec,
esc : esc,
eq : eq,
tol : tol,
tol_1 : tol_1,
tol_2 : tol_2,
tol_3 : tol_3,
tol_4 : tol_4
}
}
Script en el Assistant
{
"id": "ad703b94-98765-410c-9527-d717daa21962",
"name": "Lista (1)",
"showLastUpdate": false,
"noDataState": {
"verticalAlignment": "middle",
"showCaption": true,
"showDescription": true
},
"noFilterState": {
"verticalAlignment": "middle",
"showCaption": true,
"showDescription": true
},
"datasets": [
{
"type": "serviceDataset",
"name": "main",
"dataSource": {
"type": "itemDataSource",
"itemId": "f19f4dd9875632e4863c7ecb16",
"layerId": 0
},
"filter": {
"type": "filterGroup",
"condition": "OR",
"rules": [
{
"type": "filterGroup",
"condition": "AND",
"rules": [
{
"type": "filterRule",
"field": {
"name": "objectid",
"type": "double"
},
"operator": "is_not_null",
"constraint": {
"type": "nil"
}
}
]
}
]
},
"groupByFields": [
"division"
],
"orderByFields": [
"division"
],
"statisticDefinitions": [],
"maxFeatures": 20,
"clientSideStatistics": false,
"outFields": [
"*"
],
"returnDistinctValues": false,
"allowSourceDownload": false,
"allowSummaryDownload": false
}
],
agradezco su ayuda