Select to view content in your preferred language

Popup formatting dates and numbers in FlexViewer 2.3

5113
15
04-19-2011 11:33 AM
JosVroegop
Deactivated User
I am looking for information on how to use date and number formatting in the flexviewer's 2.3 popups.
There is one example that uses the date formatter but i can't seem to get it to work in my own popups. Can anyone help me out? Thanx in advance.
Tags (2)
0 Kudos
15 Replies
DerekHunter
Emerging Contributor
Any way to convert UTC to dd/mm/yyyy in mxml ?
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Derek,

   Go grab version 2.3.2. I have added datefield and dateformat to the configuration.
0 Kudos
DerekHunter
Emerging Contributor
Thanks Robert
0 Kudos
FrankRoberts
Frequent Contributor
Thought I would tack on a question to this thread.  I have popup.xml configured to show a variety of fields from a layer in FlexViewer 2.3.  Some of these fields are coded domains.  On all the fields but one this works just great.  However on one field for some reason the popup gives the code value (e.g. "1") instead of the description of the domain.

I've reviewed the information in the mxd that is being published and the text value comes up when I do an identify in ArcMap, so it looks right there.

I've then reviewed the rest end point and it list the coded domain and the text values, just like the other coded domains in the dataset that work well with the popup.xml.  So there seems to be no difference there.

I have also added the feature layer to ArcGIS.com map and the domain all appear correctly there.  So that leads me to believe the the service is rendering the information correctly.

To add a twist to this, it appears that at some locations the value appears correctly in the popup in the Flexviewer and at others it displays the code.

I have provided examples below, if this isn't very clear.

Any idears?
0 Kudos
by Anonymous User
Not applicable
Jon,

   The thousands separator is a bug.

   If you are one that is using the FlexViewer source code than you can fix the BUG that is causing this.

In the MapManager.mxml line 980.

is Currently (BUG):

pFieldInfo.format.useThousandsSeparator = fields.format.@usethousandseparator;


needs to be (FIX):

pFieldInfo.format.useThousandsSeparator = fields.format.@usethousandseparator == "true";


Hello - I searched for this bug to see if it had been fixed, but couldn't locate it - do you know if it's been fixed?

I am configuring a pop-up in ArcGIS Viewer for Flex 3.0 and am trying to get rid of the thousand separators:

    
<fields>
 <field name="ALPHA_NAME" alias="Name:" visible="true"/>
 <field name="ACCOUNT_ID" alias="Account ID:" visible="true">
  <format usethousandseparator="false"/>
 </field>
<fields> 


I am using a compiled xml and don't think the pFieldInfo fix that you suggested for Jon applies to me (true?)

Any suggestions for me (I could configure my entire pop-up with HTML but I'm even less handy with HTML tags...?)
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Katie,

   It looks like your issue is that you are missing an "s" in the attribute it should be "usethousandsseparator"

<fields>
    <field name="ALPHA_NAME" alias="Name:" visible="true"/>
    <field name="ACCOUNT_ID" alias="Account ID:" visible="true">
        <format usethousandsseparator="false"/>
    </field>
<fields>
0 Kudos