I wrote a custom arcade expression for a popup in Pro (3.3.4) that is supposed to take a measured value & convert it into a station measurement (i.e. 240786.89 becomes 240786+89). When I publish the feature class, the expression doesn't carry over to portal.
function engm_readable (measure) {
if(!IsEmpty(measure)){
var int_measure = Round(measure,0)
IIF(int_measure > measure, int_measure -= 1, int_measure)
var float_measure = Round((measure - int_measure),2)*100
return Concatenate([Text(int_measure), Text(float_measure)], "+")
}
else { return Null }
}
engm_readable($feature.engm)I can copy this same expression up to a web map, and it works just fine. Why is this not publishing from Pro? I'd rather manage my arcade expressions in Pro.
Solved! Go to Solution.
@Robert_LeClair publishing to Enterprise 11.3.
FWIW, I got this to work using a simplified version of the script. There was something funny about the logic that the web map just didn't seem to like.
Floor($feature.engm/100) + '+' + Text($feature.engm%100, '00.00')
edit (post marking as solution): simplify your expression as much as possible. conditional statements to handle blank or null fields aren't always entirely necessary. in this case, my updated code returns 0+00.00 if the field "engm" is null.
Are you sharing to an ArcGIS Online portal or an ArcGIS Enterprise portal? If Enterprise, what release is your portal?
@Robert_LeClair publishing to Enterprise 11.3.
FWIW, I got this to work using a simplified version of the script. There was something funny about the logic that the web map just didn't seem to like.
Floor($feature.engm/100) + '+' + Text($feature.engm%100, '00.00')
edit (post marking as solution): simplify your expression as much as possible. conditional statements to handle blank or null fields aren't always entirely necessary. in this case, my updated code returns 0+00.00 if the field "engm" is null.