arcgis Field Calculator
A, VB Script
1, taken after several or a few fields before
Left (field names, 6 ) Right (field names, 6 )
2, and the combined field, the middle symbol
Dim a if [ZDDM2] ="" Then a= [ZDDM1] else a= [ZDDM1] + "/" + [ZDDM2] end if
3, ifelse Analyzing
dim u if [OBJECTID] =1 then u="a" elseif [OBJECTID] =2 then u="b" end if
Note: No matter how many if, as long as the end if a write on the line.
4, unified assignment
5, fuzzy query
ZDDM LIKE'%JC%'
Two, Python script
1, string + date + supplements from Qi
REC = 0 # no spaces DEF autoIncrement (): # no spaces, defined a method name Global REC # a space PSTART =. 1 # a space, the initial value may be adjusted pInterval =. 1 # a space, the self-energizing interval may be adjusted IF ( == 0 REC): # a space REC = PSTART # two spaces the else : # a space REC REC = + pInterval # two spaces return " the TD " . datetime.datetime.now + () the strftime ( ' % m the Y% D% ' ) + ' % 08D ' % REC #A space, string + time + supplements from Qi