AnsweredAssumed Answered

How do I format a numeric field in a pop-up (WAB Developer)

Question asked by rastrauch Champion on Feb 2, 2015
Latest reply on Oct 14, 2015 by Xiaodong_Wang-esristaff

I'm trying to customize my pop-ups, so that the square mile field is either rounded or one decimal.  I am using the LocalLayerWidget Version 2.5 and AccessifizrWidget Layer - 09/28/2017 v1.2.  (Maybe the option to format fields can be added to this custom widget?)  But for now, it would help if I could just format it.

 

     <b>Area Name: </b>{name}<br>

     <b>Approx. Sq miles:  </b>{SqMi}

 

Is there a way to write the   {SqM} element to round or show only one decimal place?  Do I need to modify one of the files directly?

 

BTW - I tried to see if I could see how the Online pop-up configuration worked, but although it had a quick format option, I could not see any code changes (I have not tested by downloading from WAB online yet).

 

If there is no easy way, I know a semi quick option would just add a field to my source and use that.  Just looking for a simpler answer.

 

Thanks for your time.

Outcomes