Calculate Field tool not reading the Get Field Value

2123
10
Jump to solution
02-23-2017 02:52 PM
JssrRR
by
Occasional Contributor II

I am trying to calculate percent population using this model, it runs gives no error but the PctPop field is not giving the correct value, it just putting the SUM_POPULATION in place of calculating the percentage, as seen the table included in the image.

Also under current session, it has no results under geoprocessing, after the model runs, why is that?

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
ChrisDonohue__GISP
MVP Alum

Is the field "SUM_POPULATION" the sum of the counties population or the total population of the metro area?  I ask as I see "SUM_POPULATION" in both the Calculate Field and Get Field processes, but don't see another field that would represent the other value.  I may be missing something obvious, but it seems like we are missing one of the fields as an input needed to calculate the percentage.

Chris Donohue, GISP

View solution in original post

10 Replies
ChrisDonohue__GISP
MVP Alum

My first thought it that a Precondition may need to be established.  Otherwise the Calculate Field might run before the Get Field Value.  However, I am not certain that is what is causing the issue.  Might be worth a try, though.

ArcGIS Help (10.2, 10.2.1, and 10.2.2) - A Quick Tour of Preconditions

ArcGIS Help (10.2, 10.2.1, and 10.2.2) - Setting Preconditions

Chris Donohue, GISP

ChrisDonohue__GISP
MVP Alum

In terms of the issue with their not being results under geoprocessing, is the geoprocessing option checked?  Go to:  Geoprocessing, Geoprocessing Options..., check on "Log geoprocessing options to a log file". 

Also, consider lengthening the time interval in section "Results Management" by "Keep results younger than:"  Check this setting, as one of the options is "Never save".

Viewing tool execution history—Help | ArcGIS for Desktop 

Chris Donohue, GISP

JssrRR
by
Occasional Contributor II

Chris,

Thanks for your quick response, as for checking the the geoprocessing options, I have it set at  "Never Delete", tried again, still no results.

0 Kudos
ChrisDonohue__GISP
MVP Alum

To help in troubleshooting, can you post what the Get Field Value tool inputs look like?  I.e. what is filled in here:

Chris Donohue, GISP

JssrRR
by
Occasional Contributor II

I tried after setting the precondition that you suggested, it is now calculating some value in PctPop, but not the correct percentage value, that I get using the field calculator

0 Kudos
ChrisDonohue__GISP
MVP Alum

Is the field "SUM_POPULATION" the sum of the counties population or the total population of the metro area?  I ask as I see "SUM_POPULATION" in both the Calculate Field and Get Field processes, but don't see another field that would represent the other value.  I may be missing something obvious, but it seems like we are missing one of the fields as an input needed to calculate the percentage.

Chris Donohue, GISP

JssrRR
by
Occasional Contributor II

Chis,

I figured it out, I had to add another summary statistics and take the value from the first one and use the Calculate field with second table as an input and it gives me the percentages for each county in my Percent Population in the second table.

0 Kudos
ChrisDonohue__GISP
MVP Alum

Another possibility in regards to the geoprocesing history being missing.  If you are using ArcGIS 10.2, there apparently is a bug. NIM096145: When background processing is enabled, geoprocessing..   If this is the case, they do offer a workaround in that one can turn off the background processing and then the geoprocessing history will be retained.  This issue may occur in other versions, though the bug report states it is fixed in 10.5

Chris Donohue, GISP

0 Kudos
JssrRR
by
Occasional Contributor II

I am using ArcGIS 10.4x.

Thanks

0 Kudos