<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Remove leading zeros from value in ArcGIS Viewer for Flex Questions</title>
    <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/remove-leading-zeros-from-value/m-p/278911#M8376</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I would like to have the leading zeros removed from the output results.&amp;nbsp; For example when a feature is selected and the attributes are displayed I want it to show L-12345 not L-0000000012345.&amp;nbsp; Or if you do a search by typing in L-12345 and not&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;L-0000000012345.&amp;nbsp; Is there a way to do this in the esearch widget tool?&amp;nbsp; Thanks!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 15 Nov 2013 13:32:04 GMT</pubDate>
    <dc:creator>TinaCanady</dc:creator>
    <dc:date>2013-11-15T13:32:04Z</dc:date>
    <item>
      <title>Remove leading zeros from value</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/remove-leading-zeros-from-value/m-p/278911#M8376</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I would like to have the leading zeros removed from the output results.&amp;nbsp; For example when a feature is selected and the attributes are displayed I want it to show L-12345 not L-0000000012345.&amp;nbsp; Or if you do a search by typing in L-12345 and not&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;L-0000000012345.&amp;nbsp; Is there a way to do this in the esearch widget tool?&amp;nbsp; Thanks!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Nov 2013 13:32:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/remove-leading-zeros-from-value/m-p/278911#M8376</guid>
      <dc:creator>TinaCanady</dc:creator>
      <dc:date>2013-11-15T13:32:04Z</dc:date>
    </item>
    <item>
      <title>Re: Remove leading zeros from value</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/remove-leading-zeros-from-value/m-p/278912#M8377</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Are all the fields similar in that the first character is a letter and the second is the&amp;nbsp; "-" symbol and the third is a Zero? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Hi,&lt;BR /&gt;I would like to have the leading zeros removed from the output results.&amp;nbsp; For example when a feature is selected and the attributes are displayed I want it to show L-12345 not L-0000000012345.&amp;nbsp; Or if you do a search by typing in L-12345 and not&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;L-0000000012345.&amp;nbsp; Is there a way to do this in the esearch widget tool?&amp;nbsp; Thanks!&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Nov 2013 14:48:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/remove-leading-zeros-from-value/m-p/278912#M8377</guid>
      <dc:creator>RobertBorchert</dc:creator>
      <dc:date>2013-11-15T14:48:42Z</dc:date>
    </item>
    <item>
      <title>Re: Remove leading zeros from value</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/remove-leading-zeros-from-value/m-p/278913#M8378</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Are all the fields similar in that the first character is a letter and the second is the&amp;nbsp; "-" symbol and the third is a Zero?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Yes that is correct.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Nov 2013 14:58:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/remove-leading-zeros-from-value/m-p/278913#M8378</guid>
      <dc:creator>TinaCanady</dc:creator>
      <dc:date>2013-11-15T14:58:54Z</dc:date>
    </item>
    <item>
      <title>Re: Remove leading zeros from value</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/remove-leading-zeros-from-value/m-p/278914#M8379</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Go to the layer properties in your attribute with the leading zeros.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Click on the display tab and then the Expression button.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Where there is the check box for Advanced click that.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Now write this in your dialog box. or copy paste if it works &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Function FindLabel ( [TextTest]&amp;nbsp; )&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;if instr(3, [TextTest] ,1)&amp;nbsp; then&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;FindLabel = left( [TextTest] ,2) &amp;amp; mid( [TextTest] ,(instr(3,[TextTest] ,1)),10)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;end if&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;End Function&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Where it says [TextTest] change it to your attribute&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Now this is important.&amp;nbsp; The way it is in now it will only do it correctly for the strings that start with a 1 after the zeros.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Copy and paste everything from and including &lt;/SPAN&gt;&lt;STRONG&gt;IF &lt;/STRONG&gt;&lt;SPAN&gt;to&lt;/SPAN&gt;&lt;STRONG&gt; End IF&lt;/STRONG&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;change both of the &lt;/SPAN&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;SPAN&gt; to &lt;/SPAN&gt;&lt;STRONG&gt;2&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp; paste again for each number through 9 and change the 1 to the next number.&amp;nbsp; make sure End Function stays at the end.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Where you see the &lt;/SPAN&gt;&lt;STRONG&gt;10&lt;/STRONG&gt;&lt;SPAN&gt; that is the number of characters after the zeros to display.&amp;nbsp; If your string is longer than that increase the number.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Nov 2013 16:40:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/remove-leading-zeros-from-value/m-p/278914#M8379</guid>
      <dc:creator>RobertBorchert</dc:creator>
      <dc:date>2013-11-15T16:40:54Z</dc:date>
    </item>
    <item>
      <title>Re: Remove leading zeros from value</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/remove-leading-zeros-from-value/m-p/278915#M8380</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Go to the layer properties in your attribute with the leading zeros.&lt;BR /&gt;&lt;BR /&gt;Click on the display tab and then the Expression button.&lt;BR /&gt;&lt;BR /&gt;Where there is the check box for Advanced click that.&lt;BR /&gt;&lt;BR /&gt;Now write this in your dialog box. or copy paste if it works &lt;BR /&gt;&lt;BR /&gt;Function FindLabel ( [TextTest]&amp;nbsp; )&lt;BR /&gt;if instr(3, [TextTest] ,1)&amp;nbsp; then&amp;nbsp; &lt;BR /&gt;FindLabel = left( [TextTest] ,2) &amp;amp; mid( [TextTest] ,(instr(3,[TextTest] ,1)),10)&lt;BR /&gt;end if&lt;BR /&gt;&lt;BR /&gt;End Function&lt;BR /&gt;&lt;BR /&gt;Where it says [TextTest] change it to your attribute&lt;BR /&gt;Now this is important.&amp;nbsp; The way it is in now it will only do it correctly for the strings that start with a 1 after the zeros.&lt;BR /&gt;&lt;BR /&gt;Copy and paste everything from and including &lt;STRONG&gt;IF &lt;/STRONG&gt;to&lt;STRONG&gt; End IF&lt;/STRONG&gt; &lt;BR /&gt;&lt;BR /&gt;change both of the &lt;STRONG&gt;1&lt;/STRONG&gt; to &lt;STRONG&gt;2&lt;/STRONG&gt;&amp;nbsp; paste again for each number through 9 and change the 1 to the next number.&amp;nbsp; make sure End Function stays at the end.&lt;BR /&gt;&lt;BR /&gt;Where you see the &lt;STRONG&gt;10&lt;/STRONG&gt; that is the number of characters after the zeros to display.&amp;nbsp; If your string is longer than that increase the number.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you so much, I will give it a try and let you know what happens!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Tina&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Nov 2013 17:18:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/remove-leading-zeros-from-value/m-p/278915#M8380</guid>
      <dc:creator>TinaCanady</dc:creator>
      <dc:date>2013-11-15T17:18:58Z</dc:date>
    </item>
    <item>
      <title>Re: Remove leading zeros from value</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/remove-leading-zeros-from-value/m-p/278916#M8381</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;TRY JUST the first part first to make sure it is working for you before creating the rest of the code.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Nov 2013 17:40:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/remove-leading-zeros-from-value/m-p/278916#M8381</guid>
      <dc:creator>RobertBorchert</dc:creator>
      <dc:date>2013-11-15T17:40:57Z</dc:date>
    </item>
    <item>
      <title>Re: Remove leading zeros from value</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/remove-leading-zeros-from-value/m-p/278917#M8382</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;TRY JUST the first part first to make sure it is working for you before creating the rest of the code.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;It worked! &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks again&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Tina&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Nov 2013 18:27:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/remove-leading-zeros-from-value/m-p/278917#M8382</guid>
      <dc:creator>TinaCanady</dc:creator>
      <dc:date>2013-11-15T18:27:57Z</dc:date>
    </item>
  </channel>
</rss>

