Select to view content in your preferred language

Field calculator and model builder

5207
3
06-08-2010 11:51 AM
akikoelders
New Contributor
Hi,
I am working on a project where I need to use the calculate field tool within model builder. 

What I have done so far is:
to create two feature layers (created by selecting 2 different attributes) and I have identified where the layers intersect (use select by location where layer 1 and layer 2 intersect).  

goal:
The select by location tool then creates a selection (where intersection occurs), which I then need to do a field calculate on to change all the values that are selected.

The problem:
when I do the field calculation, the values in the attribute table change, but not permanently.  If I were doing this manually I would just right click the field and do a field calculation and all the selected values would change.  When I do this same sort of thing in model builder, the values only change until I need to move on to the next step or I clear the selection. 

Is there anyway to solve this problem?  Am I just using the wrong tool? 

thanks for the help!

UMDproject21
0 Kudos
3 Replies
TomMagdaleno
Regular Contributor
When I get problems like this I break up the process or add steps to make it work.  I would have it export the selected and updated table out to a seperate file.  The I would use the field calculator in model builder to calculate the fields.  So even if it fails, you have a copy of the correct table which you can join back into the original.
0 Kudos
MarkMenzel
New Contributor III
Hi All,

In model builder there is the concept of intermediate data, which is data that is temporarily stored while the model runs and by default does not get saved. For any part of the model that gives an output you can 'right click' and check if the step is intermediate or not, just like if you were making an input a parameter of the model.

Cheers
Mark
0 Kudos
ryanreise
New Contributor
Did you ever find a resolution to this issue?

I have the same issue. I would like to calc. the values from a selected set of records using "select layer by attributes" and write that to an existing feature class rather then a feature layer. As far as I know to create any kind of selection in model builder, it must be from a feature layer. In the past I have exported to a new feature class, but in this case I really want to populate the existing feature class.

Thanks.
0 Kudos