Short Int to Text in Field Calculator?

6015
7
05-09-2017 03:19 PM
AlexBullen1
Occasional Contributor II

I'm in Arcmap 10.3 and trying to convert a short integer field into a new text field. Made the new text field and working with Str( [numericField] )  with no success. Does anyone know the proper the proper syntax for what I'm trying to do?

Thanks, Alex

http://www.esri.com/news/arcuser/0405/files/fieldcalc_1.pdf 

0 Kudos
7 Replies
DanPatterson_Retired
MVP Emeritus

Python parser... select string... then in the expression   str(!YourFieldNameHere!)     surrounded ! exclamation marks

AlexBullen1
Occasional Contributor II

Thanks Dan. I keep getting "None" as the result in all the fields

Python parser, str(!SWR_SIZE!) in the Field Calculator

0 Kudos
JayantaPoddar
MVP Esteemed Contributor

Create a new TEXT field. In Field Calculator, just define the Short Integer FieldName. No additional function required.



Think Location
AlexBullen1
Occasional Contributor II

I'm not sure what you mean by define :/. I have created the text field, titled SWR_SIZE_TXT. The integer field is SWR_SIZE.

DanPatterson_Retired
MVP Emeritus

click on 'String' under the Type: section  ... and where is the SWR_SIZE fiele?  If looks like that that field is <Null> so when it gets converted to text it becomes ... None ...   show that field

AlexBullen1
Occasional Contributor II

That's it. Null became "None" and all the other values passed through to the new field. Awesome, thanks Dan!!

0 Kudos
DanPatterson_Retired
MVP Emeritus

It is a python thing

0 Kudos