Geoprocessing tool to concatenate two fields together

722
6
Jump to solution
06-09-2014 10:34 AM
ScottLouque
New Contributor III
I am trying to build me a model for creating a street map index in modelbuilder. I have already built the part to create the grid and data driven pages. I used the 'add field' tool in database management to add a new field to my table. Now I am trying to find a way to concatenate my streets labels and the pageName together so I can have an Index field in my table to use in my map. Is their a geoprocessing tool that will do this?

Thanks
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
IanMurray
Frequent Contributor
Right, summarize takes only numeric fields, so text fields wouldn't be valid.

If you need data about how many of each value in the field, I'd try the frequency tool. 

If you just need to output that field in the table to a dbf, use table to table tool.  You won't be able to specify the field you are exporting, but you can edit it in excel.

View solution in original post

0 Kudos
6 Replies
IanMurray
Frequent Contributor
If you are merely needing this for labelling purposes, there are several easy python ways to do it without creating a new field.

If you really need to populate a field with those, make a new text field, then just use the field calculator, select python as parser and make the field = str(field1here) + str(field2here).

Conversely you could make copies of your fields if they are not text type fields, by making two text, new fields and using the field calculator to populate the values in, then create a 3rd new text field and just make it equal to copiedfield1 + copiedfield2
0 Kudos
ScottLouque
New Contributor III
Thanks for the reply!

That's what I did. I was just wondering if there was a way to make it all part of a model. I also have to summarize the field after to create a .dbf file so I can bring it into Excel and format it the way I want.

Thanks,
Scott
0 Kudos
IanMurray
Frequent Contributor
You should be able to use the calculate field tool after the add field, then use the summary statistics tool if you need to summarize it.
0 Kudos
ScottLouque
New Contributor III
Can you use the summary statistics tool to export a field to a .dbf file? I tried using summary statistics to do it but when I enter the field I want to export out, I get a red X by it saying this field is not a valid member of sum, mean, max, etc. Is there another tool to do this?
0 Kudos
IanMurray
Frequent Contributor
Right, summarize takes only numeric fields, so text fields wouldn't be valid.

If you need data about how many of each value in the field, I'd try the frequency tool. 

If you just need to output that field in the table to a dbf, use table to table tool.  You won't be able to specify the field you are exporting, but you can edit it in excel.
0 Kudos
ScottLouque
New Contributor III
That sounds like an idea! Thanks!
0 Kudos