3

I have one grid (Atl1x1.shp) to which I need to add 9 Fields from 9 different shapefiles which are also grids (that is, 1 column from each shp, all with the same name). These shapefiles have the same number of records and the same Primary ID field as my original shp, so I used the JOIN FIELD tool where that PrimaryID would be both my Input Join field and my Output Join field, the original Atlantic1x1.shp would be the Input Table and the 9 shps would be the Join Tables.

Since I was in a hurry, I used the Join Field toolbox 9 different times, using the output of one Join Field as the Input Table of the following one. This way I ended up with a shapefile similar to the original Atlantic1x1.shp, with 9 extra columns in the attribute table coming from the 9 shps I used as Join Tables.

Since I will have to do this again in the future, I am working on a model to do it automatically. I do not know much about Model Builder, but I guess there must be a way to do this by adding one of the iterators.

In the pic you can see what I did so far.

enter image description here

Atl1x1.shp is the original grid

FishSpp1x1 is the directory where the 9 shps are stored.

My problem is that I don´t know how to tell the model to use Atlantic1x1 as the original Input Table for the Join Field, but then use the updated shp with the extra column as the Input Table in the second repetition, then that updated shp (with already 2 extra columns) as Input for the third repetition, etc.

Is there an easy way of doing this?

  • 1
    Check out this answer to a similar question – Nxaunxau Nov 21 '13 at 11:44
  • 1
    Thank you, that post helped solved my problem! I will try artwork21´s option too though, that may be quicker – anacondada Nov 22 '13 at 9:45
1

A simple model using the tables iterator was enough to do what I needed to do, see the pic: enter image description here

When I have time I will try the "merge" option that artwork21 suggested, as I believe that would be another easy way around it.

0

If your 9 Join Tables are of the same database schema you could eliminate the iterator thought by just merging those 9 layers together (keeping only the fields you need), then perform the Join Field function once on the merged grid.

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.