Quantcast
Channel: Forums - ArcGIS for Desktop - General
Viewing all articles
Browse latest Browse all 2565

expression help PLEASE!

$
0
0
I am trying to add a simple line to my expression. It works when I use it by itself, but when put into the lenghty expression it does not work.
I have tried many different things with no success. I had posted a few days ago with another expression that I got to work, :), but the map ends up quite busy with all the labels. So this line would filter out some of the smaller parcels.

I am trying to tell the expression to only label parcels with acreages over 6 acres.
This is what works by itself:

Function FindLabel ( [GIS_AC] )
if ([GIS_AC] > 6) then
FindLabel = Round ([GIS_AC], 0) &"ac.+/- "
end if
End Function


THis is the whole expression, with it added, that does not work....
I added it to the second line......


Function FindLabel ( [owner], [Former_Own] , [Taxcard_id], [GIS_AC] )
owner = Replace( [owner], "&", "and") and if ([GIS_AC] > 6) then
FindLabel = "<FNT name='California'>" & PCase( owner ) & "</FNT>" & _
vbnewline & _
Round ([GIS_AC],0) & "ac.+/- " & _
vbnewline & _
"<CLR red='130' green='130' blue='130'><ITA>" & PCase( [Former_Own] ) & "</ITA></CLR>" & _
vbnewline & _
"<FNT name='Arial'><CLR red='20' green='100' blue='20'>" & [Taxcard_id] & "</CLR></FNT>"
End Function
Function PCase(strInput)
Dim iPosition
Dim iSpace
Dim strOutput
iPosition = 1
Do While InStr(iPosition, strInput, " ", 1) <> 0
iSpace = InStr(iPosition, strInput, " ", 1)
strOutput = strOutput & UCase(Mid(strInput, iPosition, 1))
strOutput = strOutput & LCase(Mid(strInput, iPosition + 1, iSpace - iPosition))
iPosition = iSpace + 1
Loop
strOutput = strOutput & UCase(Mid(strInput, iPosition, 1))
strOutput = strOutput & LCase(Mid(strInput, iPosition + 1))
PCase = strOutput
End Function


Thanks in advance for any help.......

Viewing all articles
Browse latest Browse all 2565

Trending Articles