Function FindLabel ( [PM] ) if [PM] mod 1 = 0 then FindLabel = [PM] end if End Function
Are you familiar with modulus division? It gives you the remainder. You want to check if PM % 1 = 0. That will be true for whole numbers, such as 11 % 1 == 0. 11.5 % 1 will equal 0.5. (This is python notation).
It's a little more complicated if PM is a float or double datatype, because there you'll have to check if the value is very close to 0, rather than equaling 0, but the principle is the same. If PM is text, there's an even simpler way, but I'm guessing it's numeric.
So in label expressions, you want something like this (in vbscript):Function FindLabel ( [PM] ) if [PM] mod 1 = 0 then FindLabel = [PM] end if End Function
MOD(ROUND("PM" * 10, 0), 10) = 0
def FindLabel ( [PM] ): if float([PM]) % 1 == 0: return [PM]
Are you looking for ArcMap to only display labels if the float number is equivalent an even integer?
Ex: 12.0 is labeled, but 12.3 is NOT
If you're looking to not display them at all, you can use the Definition Query tab, which actually used SQL queries instead of Python.
Assuming your PM field is a float or double, you can use something like this.MOD(ROUND("PM" * 10, 0), 10) = 0
The Modulus Operator in SQL doesn't handle floats, but if multiply your values by 10 and round them, you should be able to Modulus them by 10 to test for the same thing in a roundabout fashion.
For Labeling only these features heres my version of the labeling function in Python:def FindLabel ( [PM] ): if float([PM]) % 1 == 0: return [PM]