Select to view content in your preferred language

Help with Label Expression ArcMap using mid and find.

527
1
01-04-2021 11:14 AM
ScottCorwin
Occasional Contributor

Hi, I need some help doing an arcade expression from ArcGIS Pro 2.5.1 in ArcMap 10.8, and I just can't figure it out in VBScript, I have not tried it in python as I've never really used in in label expressions.

Here is the expression in Arcade, it's done as a catch all looking for anywhere it has BLDG, sometimes it's in as BLD, there are a couple other variants, but this covers the majority.

$feature.FULLADDRESS + "-" + Mid($feature.COMMENT,(find('BLD',$feature.COMMENT, 0)),6)

 

Thanks for any help.

  

1 Reply
DavidPike
MVP Frequent Contributor

try this out (Python):

!FULLADDRESS! + "-" + !COMMENT![(!COMMENT!.find('BLD')):(!COMMENT!.find('BLD')+6)]

fieldcalc.png