I have one main shapefile with many various attributes. It does include an ObjectID to act as the basis for a join/merge. This shapefile was distributed out to multiple people, who each worked on specific attributes within that file. The attributes all started out with a value of NULL before being distributed.

I am now working on creating a Modelbuilder tool using an iterator to go through these tables and add the new data from each person back into the original shapefile.

I need the new data to overwrite the NULL values for each attribute. I don't have experience with Python and I am fairly new to Modelbuilder as well.

I am currently using 'Iterate Feature Classes' in combination with 'Join Fields', but so far it's not working out. Here's what I have right now:


I have that nested in another model that calculates fields, but my problem lies here and I don't think it will be necessary to nest anyways.

What is the best way to go about this?

  • 1
    Please edit your question to show us what you've tried - a screenshot or two could be useful for ModelBuilder. Do you have a field in each shapefile that matches your ObjectID in your main shapefile? ObjectIDs can be risky to join on as they may be different between the different files. Would be better to have a static ID field to join on.
    – Midavalo
    Apr 6 '17 at 16:16
  • I added an example of my current model. The ObjectID is the same in the main file as it is in the file that was distributed, so that shouldn't be an issue.
    – Duderino
    Apr 6 '17 at 16:27
  • Be aware that the Copy Features may produce new ObjectIDs, particularly if there are any gaps.
    – Midavalo
    Apr 6 '17 at 16:31

The logic of your model is incorrect. The Join Field joins the fields into your table, presumably you are trying to join the attribute output from your iterator into you copied route_shapefile. On the first iteration that will work. On the second iteration you overwrite your data because you are making a copy of it! With each loop you keep creating a new copy which overwrites.

If you are using sub-models then you want to copy your route layer ONCE then loop joining your fields. So your copy Features needs to be in the master model that is calling this sub-model.

  • Thank you! That solved my first problem. My second problem has to do with overwriting the NULL values. Let's say that there are 4 fields (Soil_type, Soil_PH, Vegetation_cover, and Cover_depth). These four attributes are all NULL in the main table. Each worker completed one individual attribute in their own copy of the table. Without renaming the fields, is there a way to iterate the process of overwriting the NULL values with the new values from each of the four tables?
    – Duderino
    Apr 6 '17 at 18:44
  • The way I would do this is select the rows for a specific column in main table then run the calculate field tool to pass in the values from your joined field.
    – Hornbydd
    Apr 6 '17 at 19:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.