Select to view content in your preferred language

Popup Expression Does Not Publish to Portal

272
2
Jump to solution
10-06-2025 02:03 PM
MGAL
by
Emerging Contributor

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. 

0 Kudos
1 Solution

Accepted Solutions
MGAL
by
Emerging Contributor

@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.

View solution in original post

2 Replies
Robert_LeClair
Esri Esteemed Contributor

Are you sharing to an ArcGIS Online portal or an ArcGIS Enterprise portal?  If Enterprise, what release is your portal?

0 Kudos
MGAL
by
Emerging Contributor

@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.