10.3 Labeling

5210
10
Jump to solution
04-12-2016 07:26 AM
MikeFroese
New Contributor II

I have a label expression where I want to not display any building numbers greater than 1000. We went from 10.0 to 10.3. The script worked in 10.0 but not 10.3.

Function FindLabel ( [buildingNumber] )

if ( [buildingNumber] < 1000) then

FindLabel = [buildingNumber]

end if

End Function

Thanks for any help

Mike

0 Kudos
1 Solution

Accepted Solutions
AdrianWelsh
MVP Honored Contributor

Mike,

Be sure the check the box for "Advanced" in the expression dialog:

View solution in original post

0 Kudos
10 Replies
TedKowal
Occasional Contributor III

What sort of side effects are you getting?  Is Building Number a number or a string that represents a number?  There appears to be nothing wrong with your expression....

I am running 10.4  and had a label script similar to yours and it runs with no problems except that the number is a string number so I had to convert the string to a number......

Function FindLabel ( [MDXID] )
if  Int([MDXID]) < 140 then
 FindLabel = [MDXID]
end if
End Function
0 Kudos
MikeFroese
New Contributor II

I am using the same parser but get

'Carriage returns are not allowed in simple expressions.'

0 Kudos
MikeFroese
New Contributor II

I am using the same parser but get

'Carriage returns are not allowed in simple expressions.'

0 Kudos
AdrianWelsh
MVP Honored Contributor

Mike, can you make sure you are still using the same Parser to carry out this expression? It looks like this is for the VBScript Parser. It might be a good idea to make sure this is still the case.

0 Kudos
MikeFroese
New Contributor II

I am using the same parser but get

'Carriage returns are not allowed in simple expressions.'

0 Kudos
AdrianWelsh
MVP Honored Contributor

Mike,

Be sure the check the box for "Advanced" in the expression dialog:

0 Kudos
MikeFroese
New Contributor II

WOW! Do I feel dumb!

I completely overlooked the check box!

Thanks

0 Kudos
DarrenWiens2
MVP Honored Contributor

I'm at 10.2.2, but I get your error if I try to use the expression without Advanced selected.

0 Kudos
MikeFroese
New Contributor II

WOW! Do I feel dumb!

I completely overlooked the check box!

Thanks

0 Kudos