WebApp Builder / Flex Viewer - Problem with Postal Code / ZIP Codes

4388
11
Jump to solution
05-12-2015 06:44 AM
ThomasSteudel1
Occasional Contributor

Hello Community,

since the beginning of my work with Flex as well as with the new WebAppBuilder i have a problem with the representation of postal codes / ZIP code within the PopUp.

My shapefile was created within ArcGIS. I had points and joined some information to them. The information from an external table also included Postal Codes. After the table join everything looks fine in ArcGIS.

An Example: Postal Code as shown and stored within my shp-file: 91126

Now my problem:

Within Flex Viewer as well as within the WAB my postal code is reformated:

Within Flex the example Postal Code changes to: 91.126  (the option to use 1000-seperator within the pop up configurator is off)

Within WAB the example Postal Code changes to: 91.126,00

Where can i define the representation of fields including a number? I do not want to change the field in a string field.

Does anyone have any experience and maybe a solution to the shown problem?

Best regards and thank you in advice,

Thomas

0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

Thomas,

   In WAB is the layer that has that popup from a web map or from a widget like local layer widget? If it is from a web map then you format the popup fields in the AGOL web map.

example.jpg

View solution in original post

11 Replies
RobertScheitlin__GISP
MVP Emeritus

Thomas,

   In WAB is the layer that has that popup from a web map or from a widget like local layer widget? If it is from a web map then you format the popup fields in the AGOL web map.

example.jpg

ThomasSteudel1
Occasional Contributor

Thanks that solved the issue for the WAB. Do you have any idea how to handle it within Flex?

Best regards,


Thomas

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Thomas,

   Sure see my last post.

0 Kudos
ThomasSteudel1
Occasional Contributor

Sorry, i refreshed to late! I will have a try and give you feedback!

Thank you very much!

Thomas

0 Kudos
ThomasSteudel1
Occasional Contributor

Sorry for this "spam" answering but i can not modify my other answer.

I checked my xml and included the tags within the popup.xml for the specific layer (PLZ = ZIP):

<?xml version="1.0" ?>

<configuration>

    <title>{Name}</title>

    <fields>

        <field name="FID" alias="FID"/>

        <field name="Name" alias="Name"/>

        <field name="Strasse" alias="Strasse" visible="true"/>

        <field name="PLZ" alias="PLZ" visible="true" format precision="-1" usethousandsseperator="false"/>

        <field name="Ort" alias="Ort" visible="true"/>

        <field name="Telefon" alias="Telefon" visible="true"/>

        <field name="Email" alias="Email" visible="true"/>

        <field name="Homepage" alias="Homepage" visible="true"/>

        <field name="Rabatt" alias="Rabatt" visible="true"/>

        <field name="Rabatt1" alias="Rabatt" visible="true"/>

        <field name="Kategorie" alias="Kategorie"/>

        <field name="Branche" alias="Branche" visible="true"/>

    </fields>

    <showattachments>false</showattachments>

    <showrelatedrecords>false</showrelatedrecords>

</configuration>

Now i am getting the following error when i open my application:

Problem while parsing the configuration file popups/PopUp_3.xml

Error #1090

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Thomas,

  It should look like this:

<?xml version="1.0" ?>
<configuration>
    <title>{Name}</title>
    <fields>
        <field name="FID" alias="FID"/>
        <field name="Name" alias="Name"/>
        <field name="Strasse" alias="Strasse" visible="true"/>
        <field name="PLZ" alias="PLZ" visible="true">
            <format precision="-1" usethousandsseperator="false"/>
        </field>
        <field name="Ort" alias="Ort" visible="true"/>
        <field name="Telefon" alias="Telefon" visible="true"/>
        <field name="Email" alias="Email" visible="true"/>
        <field name="Homepage" alias="Homepage" visible="true"/>
        <field name="Rabatt" alias="Rabatt" visible="true"/>
        <field name="Rabatt1" alias="Rabatt" visible="true"/>
        <field name="Kategorie" alias="Kategorie"/>
        <field name="Branche" alias="Branche" visible="true"/>
    </fields>
    <showattachments>false</showattachments>
    <showrelatedrecords>false</showrelatedrecords>
</configuration>
RobertScheitlin__GISP
MVP Emeritus

Thomas,

  In Flex Viewer if you are using App Builder then choose your zip field and make sure Precision is set to off. If not using App Builder then you manually build your popup xml

<?xml version="1.0" ?>
<configuration>
    <title>{Name}</title>
    <fields>
        <field name="ZIP">
            <format precision="-1" usethousandsseparator="false"/>
        </field>
    </fields>
</configuration>
0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Thomas,

Glad to help. Now it is your turn to help the community by marking this question as answered. All you have to do is click the "Correct Answer" link (the one with the little green star) on the post that provided the answer for you. If the answer was not provided by one of the responders then you can mark any of the replies that you received as helpful by clicking on the "Actions" menu and choosing "Mark as Helpful"

0 Kudos
ThomasSteudel1
Occasional Contributor

Hi Robert,

sorry for my late answer. I tried everything and it works fine now within the WAB. Within Flex i still have some problems. But i am trying to solve them. Regarding the "Correct Answer" - I would like to mark it as correct answer but i can not see the link to it (no little green star).

0 Kudos