Skip to main content
edited tags; edited tags
Link
PolyGeo
  • 65.5k
  • 29
  • 115
  • 353
added 19 characters in body
Source Link

I try to write an Arcade expression in dashboard indicator, the expression has 4 if statements but only the first two statements are works the code is below:

############################################ varvar`enter code here`ar kmillion = 10000000; var million = 1000000; var k100 = 100000; var name_km = Left($datapoint["sum_VALUE"],2) var name_m = Left($datapoint["sum_VALUE"],1) var name_k100 = Left($datapoint["sum_VALUE"],3) var name_k99 = Left($datapoint["sum_VALUE"],2) if ($datapoint["sum_VALUE"] >= kmillion) { return { topText: 'اجمالي عدد التلاميذ', topTextColor: '#a80000', topTextOutlineColor: '', topTextMaxSize: 'small', middleText: name_km, middleTextColor: '', middleTextOutlineColor: '', middleTextMaxSize: 'large', bottomText: 'مليون تلميذ', iconName:'icon1', iconAlign:'left', iconColor:'', iconOutlineColor:'' } } else if ($datapoint["sum_VALUE"] >= million < kmillion ) { return{ topText: 'اجمالي عدد التلاميذ', topTextColor: '#a80000', topTextOutlineColor: '', topTextMaxSize: 'small', middleText: name_m, middleTextColor: '', middleTextOutlineColor: '', middleTextMaxSize: 'large', bottomText: '2مليون تلميذ', iconName:'icon1', iconAlign:'left', iconColor:'', iconOutlineColor:'' } } else { return { topText: 'اجمالي عدد التلاميذ', topTextColor: '#a80000', topTextOutlineColor: '', topTextMaxSize: 'small', middleText: name_k100, middleTextColor: '', middleTextOutlineColor: '', middleTextMaxSize: 'large', bottomText: 'ألف تلميذ', iconName:'icon1', iconAlign:'left', iconColor:'', iconOutlineColor:'' } } 

I try to write an Arcade expression in dashboard indicator, the expression has 4 if statements but only the first two statements are works the code is below:

############################################ var kmillion = 10000000; var million = 1000000; var k100 = 100000; var name_km = Left($datapoint["sum_VALUE"],2) var name_m = Left($datapoint["sum_VALUE"],1) var name_k100 = Left($datapoint["sum_VALUE"],3) var name_k99 = Left($datapoint["sum_VALUE"],2) if ($datapoint["sum_VALUE"] >= kmillion) { return { topText: 'اجمالي عدد التلاميذ', topTextColor: '#a80000', topTextOutlineColor: '', topTextMaxSize: 'small', middleText: name_km, middleTextColor: '', middleTextOutlineColor: '', middleTextMaxSize: 'large', bottomText: 'مليون تلميذ', iconName:'icon1', iconAlign:'left', iconColor:'', iconOutlineColor:'' } } else if ($datapoint["sum_VALUE"] >= million < kmillion ) { return{ topText: 'اجمالي عدد التلاميذ', topTextColor: '#a80000', topTextOutlineColor: '', topTextMaxSize: 'small', middleText: name_m, middleTextColor: '', middleTextOutlineColor: '', middleTextMaxSize: 'large', bottomText: '2مليون تلميذ', iconName:'icon1', iconAlign:'left', iconColor:'', iconOutlineColor:'' } } else { return { topText: 'اجمالي عدد التلاميذ', topTextColor: '#a80000', topTextOutlineColor: '', topTextMaxSize: 'small', middleText: name_k100, middleTextColor: '', middleTextOutlineColor: '', middleTextMaxSize: 'large', bottomText: 'ألف تلميذ', iconName:'icon1', iconAlign:'left', iconColor:'', iconOutlineColor:'' } } 

I try to write an Arcade expression in dashboard indicator, the expression has 4 if statements but only the first two statements are works the code is below:

############################################ var`enter code here`ar kmillion = 10000000; var million = 1000000; var k100 = 100000; var name_km = Left($datapoint["sum_VALUE"],2) var name_m = Left($datapoint["sum_VALUE"],1) var name_k100 = Left($datapoint["sum_VALUE"],3) var name_k99 = Left($datapoint["sum_VALUE"],2) if ($datapoint["sum_VALUE"] >= kmillion) { return { topText: 'اجمالي عدد التلاميذ', topTextColor: '#a80000', topTextOutlineColor: '', topTextMaxSize: 'small', middleText: name_km, middleTextColor: '', middleTextOutlineColor: '', middleTextMaxSize: 'large', bottomText: 'مليون تلميذ', iconName:'icon1', iconAlign:'left', iconColor:'', iconOutlineColor:'' } } else if ($datapoint["sum_VALUE"] >= million < kmillion ) { return{ topText: 'اجمالي عدد التلاميذ', topTextColor: '#a80000', topTextOutlineColor: '', topTextMaxSize: 'small', middleText: name_m, middleTextColor: '', middleTextOutlineColor: '', middleTextMaxSize: 'large', bottomText: '2مليون تلميذ', iconName:'icon1', iconAlign:'left', iconColor:'', iconOutlineColor:'' } } else { return { topText: 'اجمالي عدد التلاميذ', topTextColor: '#a80000', topTextOutlineColor: '', topTextMaxSize: 'small', middleText: name_k100, middleTextColor: '', middleTextOutlineColor: '', middleTextMaxSize: 'large', bottomText: 'ألف تلميذ', iconName:'icon1', iconAlign:'left', iconColor:'', iconOutlineColor:'' } } 
added 227 characters in body; edited title
Source Link
Kadir Şahbaz
  • 78.6k
  • 57
  • 260
  • 407

ArcGIS dashboard Arcade Using multiple If/Elseelse if statements

Hello GIS community hope you are all well, I try to write an Arcade expression in dashboard indicator, the expression has 4 Ifif statements but only the first two statements are works the code is below: ############################################

var kmillion = 10000000; var million = 1000000; var k100 = 100000;

var name_km = Left($datapoint["sum_VALUE"],2) var name_m = Left($datapoint["sum_VALUE"],1) var name_k100 = Left($datapoint["sum_VALUE"],3) var name_k99 = Left($datapoint["sum_VALUE"],2)

if ($datapoint["sum_VALUE"] >= kmillion) { return { topText: 'اجمالي عدد التلاميذ', topTextColor: '#a80000', topTextOutlineColor: '', topTextMaxSize: 'small', middleText: name_km, middleTextColor: '', middleTextOutlineColor: '', middleTextMaxSize: 'large', bottomText: 'مليون تلميذ', iconName:'icon1', iconAlign:'left', iconColor:'', iconOutlineColor:''

############################################ var kmillion = 10000000; var million = 1000000; var k100 = 100000; var name_km = Left($datapoint["sum_VALUE"],2) var name_m = Left($datapoint["sum_VALUE"],1) var name_k100 = Left($datapoint["sum_VALUE"],3) var name_k99 = Left($datapoint["sum_VALUE"],2) if ($datapoint["sum_VALUE"] >= kmillion) { return { topText: 'اجمالي عدد التلاميذ', topTextColor: '#a80000', topTextOutlineColor: '', topTextMaxSize: 'small', middleText: name_km, middleTextColor: '', middleTextOutlineColor: '', middleTextMaxSize: 'large', bottomText: 'مليون تلميذ', iconName:'icon1', iconAlign:'left', iconColor:'', iconOutlineColor:'' } 

}

else if ($datapoint["sum_VALUE"] >= million < kmillion ) { return{ topText: 'اجمالي عدد التلاميذ', topTextColor: '#a80000', topTextOutlineColor: '', topTextMaxSize: 'small', middleText: name_m, middleTextColor: '', middleTextOutlineColor: '', middleTextMaxSize: 'large', bottomText: '2مليون تلميذ', iconName:'icon1', iconAlign:'left', iconColor:'', iconOutlineColor:''

} 

}

else { return { topText: 'اجمالي عدد التلاميذ', topTextColor: '#a80000', topTextOutlineColor: '', topTextMaxSize: 'small', middleText: name_k100, middleTextColor: '', middleTextOutlineColor: '', middleTextMaxSize: 'large', bottomText: 'ألف تلميذ', iconName:'icon1', iconAlign:'left', iconColor:'', iconOutlineColor:''

 else if ($datapoint["sum_VALUE"] >= million < kmillion ) { return{ topText: 'اجمالي عدد التلاميذ', topTextColor: '#a80000', topTextOutlineColor: '', topTextMaxSize: 'small', middleText: name_m, middleTextColor: '', middleTextOutlineColor: '', middleTextMaxSize: 'large', bottomText: '2مليون تلميذ', iconName:'icon1', iconAlign:'left', iconColor:'', iconOutlineColor:'' } } else { return { topText: 'اجمالي عدد التلاميذ', topTextColor: '#a80000', topTextOutlineColor: '', topTextMaxSize: 'small',  middleText: name_k100, middleTextColor: '', middleTextOutlineColor: '', middleTextMaxSize: 'large', bottomText: 'ألف تلميذ', iconName:'icon1', iconAlign:'left', iconColor:'', iconOutlineColor:'' } } 

}

ArcGIS dashboard Arcade Using multiple If/Else if statements

Hello GIS community hope you are all well, I try to write an Arcade expression in dashboard indicator, the expression has 4 If statements but only the first two statements are works the code is below: ############################################

var kmillion = 10000000; var million = 1000000; var k100 = 100000;

var name_km = Left($datapoint["sum_VALUE"],2) var name_m = Left($datapoint["sum_VALUE"],1) var name_k100 = Left($datapoint["sum_VALUE"],3) var name_k99 = Left($datapoint["sum_VALUE"],2)

if ($datapoint["sum_VALUE"] >= kmillion) { return { topText: 'اجمالي عدد التلاميذ', topTextColor: '#a80000', topTextOutlineColor: '', topTextMaxSize: 'small', middleText: name_km, middleTextColor: '', middleTextOutlineColor: '', middleTextMaxSize: 'large', bottomText: 'مليون تلميذ', iconName:'icon1', iconAlign:'left', iconColor:'', iconOutlineColor:''

} 

}

else if ($datapoint["sum_VALUE"] >= million < kmillion ) { return{ topText: 'اجمالي عدد التلاميذ', topTextColor: '#a80000', topTextOutlineColor: '', topTextMaxSize: 'small', middleText: name_m, middleTextColor: '', middleTextOutlineColor: '', middleTextMaxSize: 'large', bottomText: '2مليون تلميذ', iconName:'icon1', iconAlign:'left', iconColor:'', iconOutlineColor:''

} 

}

else { return { topText: 'اجمالي عدد التلاميذ', topTextColor: '#a80000', topTextOutlineColor: '', topTextMaxSize: 'small', middleText: name_k100, middleTextColor: '', middleTextOutlineColor: '', middleTextMaxSize: 'large', bottomText: 'ألف تلميذ', iconName:'icon1', iconAlign:'left', iconColor:'', iconOutlineColor:''

} 

}

ArcGIS dashboard Arcade Using multiple If/else if statements

I try to write an Arcade expression in dashboard indicator, the expression has 4 if statements but only the first two statements are works the code is below:

############################################ var kmillion = 10000000; var million = 1000000; var k100 = 100000; var name_km = Left($datapoint["sum_VALUE"],2) var name_m = Left($datapoint["sum_VALUE"],1) var name_k100 = Left($datapoint["sum_VALUE"],3) var name_k99 = Left($datapoint["sum_VALUE"],2) if ($datapoint["sum_VALUE"] >= kmillion) { return { topText: 'اجمالي عدد التلاميذ', topTextColor: '#a80000', topTextOutlineColor: '', topTextMaxSize: 'small', middleText: name_km, middleTextColor: '', middleTextOutlineColor: '', middleTextMaxSize: 'large', bottomText: 'مليون تلميذ', iconName:'icon1', iconAlign:'left', iconColor:'', iconOutlineColor:'' } }  else if ($datapoint["sum_VALUE"] >= million < kmillion ) { return{ topText: 'اجمالي عدد التلاميذ', topTextColor: '#a80000', topTextOutlineColor: '', topTextMaxSize: 'small', middleText: name_m, middleTextColor: '', middleTextOutlineColor: '', middleTextMaxSize: 'large', bottomText: '2مليون تلميذ', iconName:'icon1', iconAlign:'left', iconColor:'', iconOutlineColor:'' } } else { return { topText: 'اجمالي عدد التلاميذ', topTextColor: '#a80000', topTextOutlineColor: '', topTextMaxSize: 'small',  middleText: name_k100, middleTextColor: '', middleTextOutlineColor: '', middleTextMaxSize: 'large', bottomText: 'ألف تلميذ', iconName:'icon1', iconAlign:'left', iconColor:'', iconOutlineColor:'' } } 
Source Link
Loading