Wednesday, 19 July 2017

arcgis desktop - Concatenate fields on a Dissolve


I have a feature class that that I would like to dissolve. Upon the dissolve, I would like to concatenate a comment field, which is a text field. How can I do this? Conceptual idea below: enter image description here



Answer




Dissolve the GroupID only. Then extract the centroids of the original shapes. Then do a Spatial Join with the One to One option. In the tool field map make sure the output of the Comment field is to a text field and adjust the Merge Rule for the Comment field to be the Join field rule and add a delimiter character. Also expand the output length of the Comment field to the maximum you may need in the field map. The Join rule will create a list for the Comment field just like what you have shown. The order of the joined data will be in the order of the records in the table and may contain duplicate values if the same text occurs in more than one record.


enter image description here


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...