Set precision on attributes in a Flex popup

4960
2
Jump to solution
04-28-2016 02:03 PM
ChadKopplin
Occasional Contributor III

I would like to set the precision on attributes being displayed in my popup's for a Flex web map.  I believe I need to use the Format tag with precision, but the help does not show how to set up the precision.  Any assistance would be greatly appreciated.

Tags (3)
0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

Chad,

  Here is an example:

<fields>

    <field name="Shape_Area" alias="Area of Feature" visible="true">

        <format precision="2" usethousandsseparator="true"/>

    </field>

</fields>

If you are using App Builder then there is a UI for doing this.

View solution in original post

0 Kudos
2 Replies
RobertScheitlin__GISP
MVP Emeritus

Chad,

  Here is an example:

<fields>

    <field name="Shape_Area" alias="Area of Feature" visible="true">

        <format precision="2" usethousandsseparator="true"/>

    </field>

</fields>

If you are using App Builder then there is a UI for doing this.

0 Kudos
ChadKopplin
Occasional Contributor III

Thank you Robert I was able to get back to this, it worked once a caught what my issue was.  Here us a copy of the code.

<fields>

        <field name="NAME"  visible="true"/>

        <field name="NHDFLOWcfs" alias="NHD FLOW (cfs)" visible="true">

             <format precision="1" usethousandsseparator="false"/>

        </field>

        <field name="OBJECTID" alias="OBJECT ID" visible="true"/>

</fields>

All of my fields looked like the first one.  I needed to remove the hash after "true" in my flow attribute field, then I add the format line that you commented with, and last I added the </field> after the format line and it worked.  Then I just had to change the precision to the level that I needed.  Thank you for the help.

0 Kudos