TRY JUST the first part first to make sure it is working for you before creating the rest of the code.
Go to the layer properties in your attribute with the leading zeros.Click on the display tab and then the Expression button.Where there is the check box for Advanced click that.Now write this in your dialog box. or copy paste if it works Function FindLabel ( [TextTest] )if instr(3, [TextTest] ,1) then FindLabel = left( [TextTest] ,2) & mid( [TextTest] ,(instr(3,[TextTest] ,1)),10)end ifEnd FunctionWhere it says [TextTest] change it to your attributeNow this is important. The way it is in now it will only do it correctly for the strings that start with a 1 after the zeros.Copy and paste everything from and including IF to End IF change both of the 1 to 2 paste again for each number through 9 and change the 1 to the next number. make sure End Function stays at the end.Where you see the 10 that is the number of characters after the zeros to display. If your string is longer than that increase the number.
Are all the fields similar in that the first character is a letter and the second is the "-" symbol and the third is a Zero?
Hi,I would like to have the leading zeros removed from the output results. For example when a feature is selected and the attributes are displayed I want it to show L-12345 not L-0000000012345. Or if you do a search by typing in L-12345 and not L-0000000012345. Is there a way to do this in the esearch widget tool? Thanks!
Les membres connectés peuvent publier, suivre les mises à jour, et plus encore. Nouveau ici ? Inscrivez-vous gratuitement.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.