I'm wondering if there is a way to trim the trailing whitespace for a field in a mapservice for use in a popup. The example is shown below, I am displaying a service hosted by esri that displays health care facilities nationwide and I have formatted a popup to display the address by adding the fields in the appropriate order to the <![CDATA]/> tag. However, the city field has several trailing spaces that I'd like to get rid of. How can I do it?I tried to use a definitionexpression with the SQL TRIM() function on the appropriate sublayer to no avail. Can anyone point me in the right direction?I'm including a screenshot of the example, the layer tag for the main config file and the popup.xmllayer tag <layer label="Nationwide Hospitals" type="dynamic" visible="true" alpha="1" visiblelayers="6,12,18"
url="http://maps3.arcgisonline.com/ArcGIS/rest/services/A-16/HHS_IOM_Health_Resources/MapServer">
<sublayer id="6" popupconfig="popups/popup_ESRI_WOL_HealthHomeServices.xml" definitionexpression="ARC_City = TRIM(BOTH ' ' FROM ARC_City)"/>
<sublayer id="12" popupconfig="popups/popup_ESRI_WOL_HealthHomeServices.xml" definitionexpression="ARC_City = TRIM(BOTH ' ' FROM ARC_City)"/>
<sublayer id="18" popupconfig="popups/popup_ESRI_WOL_HealthHomeServices.xml" definitionexpression="ARC_City = TRIM(BOTH ' ' FROM ARC_City)"/>
</layer>
popup<?xml version="1.0" ?>
<configuration>
<title>Health Home Services: {ProviderName}</title>
<description>
<![CDATA[Health Home Services Number: {ProviderNum}<br>Address: {ARC_Address}<br> {ARC_City}, {ARC_State} {ARC_Zip}<br>Phone Number: {Telephone}<br>Date Certified: {DateCertified}<br>Ownership: {OwnershipType}]]>
</description>
<fields>
</fields>
</configuration>
Jeremy