Esri / arcade-expressions

ArcGIS Arcade expression templates for all supported profiles in the ArcGIS platform.
Apache License 2.0
284 stars 101 forks source link

Arcade Popup on AGOL Layer - Comma Expected #71

Closed katrudzki closed 1 year ago

katrudzki commented 1 year ago

Hi there, when I test this code on the ArcGIS Online Attribute Expression editor it says brings up this error on the last line: ',' expected. This is what the error looks like in the code editor:

arcade_code_error_1

When I add a comma, it says "Unexpected end of script."

The exact same code works as intended when I use it to calculate a field in ArcGIS Pro. Not sure what I'm missing here. Thoughts?

var AL = $feature.AlligatorLight;
var AM = $feature.AlligatorMod;
var AS = $feature.AlligatorSev;
var transverse = $feature.Transverse;
var block = $feature.Block;
var oxidation = $feature.Oxidation;
var patching = $feature.Patching;

MAX(1,(100
- (AL*0.1*25)
- (AM*0.1*60)
- (AS*0.1*99)
- Decode(transverse, 'No', 0, 'Yes', 5, 0)
- Decode(block, 'None', 0, 'Light', 5, 'Moderate', 20, 'Severe', 35, 0)
- Decode(oxidation, 'None', 0, 'Severe', 10, 0)
- Decode(patching, 'None', 0, 'Light', 5, 'Moderate', 10, 'Severe', 15, 0))
ekenes commented 1 year ago

This question is more suited for Esri Support or the Esri Developer Community. I suggest reaching out there: https://community.esri.com/t5/arcgis-online-developers/ct-p/arcgis-online-developers