Select to view content in your preferred language

Need some advice with model builder.

512
5
01-18-2018 11:31 AM
EvanWilson
New Contributor

Hello all.  I am trying to create a very simple model in model builder.  I want to join a table to a point layer and then select polygons that contain the matching records.  I have been doing this manually for months but would like to simplify the task.

I can get the model to run but now I would like to include a prompt so any user can run a join with whatever table they set the path too.  I am constantly getting errors concerning indexing the field, and when I account for that, the model is still not working properly.

This is my first model and I feel like I am overlooking something that is blatantly obvious which will fix my issue.

Any thoughts?  Thank you.

0 Kudos
5 Replies
DanPatterson_Retired
MVP Emeritus

a lot of models fail, because people don't know about model parameters... the little 'P' .... so to speak.

Model Parameters... set them then the user should be able to select what they want 

EvanWilson
New Contributor

Hi Dan, Thanks for the quick response.  I did take into consideration the model parameters. Even when setting Join Table as the parameter the model will fail.  I am working on ArcDesktop 10.3 which could be causing the trouble, I will see if I can make any progress in Pro.  I also attached a screen shot of the model.  Thanks again.model builder layout

0 Kudos
DanPatterson_Retired
MVP Emeritus

I would also have the points layer as a parameter since it and the join table should be able to be changed.... and is Polygons? to be fixed as well?

but I don't use modelbuilder much

EvanWilson
New Contributor

Those are some good ideas.  I'll keep plugging away and let you know how it goes.  Thanks for you help.

0 Kudos
DuncanHornby
MVP Notable Contributor

Evan,

Been doing it manually for months? Well model builder is the way forward! It's the next step for non-programmers to become "power users". Clearly the light bulb above your head has popped on for you. I would seriously consider asking your employers to put you through a model builder training course, it's for their benefit too as you'll be working faster and smarter automating your workflow rather than doing it manually ....for months....

That said, those "error" messages about indexing are not errors they are warnings as indexed fields perform better in joins.

You said:

 I want to join a table to a point layer and then select polygons that contain the matching records.

In your model you show you are using a Select Layer by Location, if you are selecting by location why are you either doing a join, the result of the join (in your model) has no outcome on the spatial selection. So I wonder if when you say "...select polygons that contain the matching records" your are really meaning when field XYZ in the joined table has the same value as the field ABC in the polygon layer? If that is the case you want to by using the Select layer by Attribute tool.

As Dan hints the way to turn a model into a generic tool is to expose the inputs/outputs as parameters this would allow a user to select any table but you would need to expose the other parameters too so allow them to choose the correct join fields.

Get yourself on a course and stop doing things manually for months!