Hello,

I've come across this problem in model builder:

I have a polygon FeatureClass (FC) of cities, and table related to that FC (containing occurences of names by cities) in a many-to-one relationship (one city has many records from the table) and I've built a model, that:

- first of all, makes a query table from the cities FC and the related table, selecting specific records and exporting the resulting polygon FC into geodatabase.

- then aggregates these cities by Dissolve tool to a higher level of municipal hierarchy (NUTS2, NUTS3...) BUT:

After the "Make Query Table" tool, I can summarize the occurences of chosen name by simply clicking on the field "name_occurence" and choosing "Statistics" I understand that. But is there a way how to add THIS number into new field to the table? Each record would have a new field named like "Name_total" and it would be the same number for all records... This is need for further calculations and it would be used as a constant in a formula...

I know which tool calculates such statistics, so when formulated in another way:

How can I populate a new field within my FC with the result of "Summary statistics" tool upon

that table with the "name_occurence" field?

Thanks in advance for any help...

I've come across this problem in model builder:

I have a polygon FeatureClass (FC) of cities, and table related to that FC (containing occurences of names by cities) in a many-to-one relationship (one city has many records from the table) and I've built a model, that:

- first of all, makes a query table from the cities FC and the related table, selecting specific records and exporting the resulting polygon FC into geodatabase.

- then aggregates these cities by Dissolve tool to a higher level of municipal hierarchy (NUTS2, NUTS3...) BUT:

After the "Make Query Table" tool, I can summarize the occurences of chosen name by simply clicking on the field "name_occurence" and choosing "Statistics" I understand that. But is there a way how to add THIS number into new field to the table? Each record would have a new field named like "Name_total" and it would be the same number for all records... This is need for further calculations and it would be used as a constant in a formula...

I know which tool calculates such statistics, so when formulated in another way:

How can I populate a new field within my FC with the result of "Summary statistics" tool upon

that table with the "name_occurence" field?

Thanks in advance for any help...

Regards,

## Attachments

1. Use the Add Field tool to add necessary fields one by one to your input FC.

2. Use the Add Join tool to join your input FC with a table that contains fields you want to transfer to the input FC. The join is based on a common field from each table.

3. Now if you open the input FC table you should see all fields from the input FC and from the joining table.

4. Use the Calculate Field tool to calculate one of the added fields with the values from a field of the joining table. You would need to repeat this step for every field you need to calculate/transfer.

5. Use the Remove Join tool to remove the join when finished.

The Join Field tool conveniently combines the above steps into one. Hope you will have access to it in the future.

I am not completely clear about how your FC and the related table are and what statistics you are trying to analyze and join to input FC. If you like, you can post a sample data and describe the specific cases. I or other people can have a look.

Regards,

Thanks 4 answer, JOHN

## Attachments

It is possible to work around this using the Statistics tool, which returns FREQUENCY (like count) for the specified field. It may be a bit tricky in getting the count back to your city FC or other data. If you are willing to share a sample data, that would help us understand exactly what's going on and perhaps how to solve the problem.

Thanks,

JOHN

## Attachments