1

I am creating many models doing many tasks. Basically, the first model will join 2 tables and the steps are as follow: make table view for each table, then add join for, then it will copy the rows for the resulted table, then add a field, and then do field calculations and finally copy the resulted rows to produce the desired table.

Now one of the input tables has a fixed name, while the other could be named anything but it will always has the same fields, so only the name will change for that table. In the calculate field step, the issue I am having, is when I run the model using a new name for the input table; for example: The first input table is named "ImpotTable" and this table always has the same name. The other input table (Join table) is named "DBO_Import" and it could be named "LPE_Import" or any other name. I want to do calculate field within the resulted join table for the field named "Number" which is from the join table.

So when I do calculate field, the "Field Calculator" window shows different field names under "Fields", so if I joined "DBO_Import" to "ImportTable" I will have "ImportTable.Number" field and "DBO_Import.Number" field; however, when I use the "LPE_Import" as a join table I will have "ImportTable.Number" and "LPE_Import.Number". So how I will tell the model to do calculate field for the "LPE_Import.Number" even if it was named "DBO_Import.Number" or any other join table name ("???.Number")?

After that, I am doing another model that is using the resulted join table as an input table. I am doing 4 different table selection, then copying the result from each step to finally produce 4 different tables based on the 4 different table select tools. Now the Issue I am having is similar to the previous one, I need to tell the model to perform the "Table select" on some fields even if the fields having different names.

For example one of the table select tools is based on the "Date" field, so if I used "DBO_Import" as a join field to produce the join table from the previous model, the "Date" field will be "DBO_Import.Date", but I want it to perform even if I used "LPE_Import" as a join table and the field is named "LPE_Import.Date", or having any name ("???.Date").

I am using ArcGIS 10.2.2 for Desktop.

  • 1
    Just a hint, dense blocks of text as you have written rarely get answered, I suggest you put some basic formatting, like paragraphs to break it up to make it easier to read. – Hornbydd Sep 11 '15 at 15:54
  • Is it better now @Hornbydd ? – user56216 Sep 11 '15 at 16:10
  • Thanks @JamesSLC ! I really appreciate your edits, especially for "using" instead of "suing"!! :D – user56216 Sep 11 '15 at 16:25
  • Good luck with finding solution. I didn't, this is why gave up with models and focused on scripts long long time ago. No regrets since – FelixIP Sep 12 '15 at 1:14
  • @FelixIP I hear ya!! I am doing my best to learn python scripting, you can solve any issue from the roots! Any advices on how to learn python? – user56216 Sep 18 '15 at 15:31
1

The issue you describe is what is referred to as qualified field. Look at the help page of the add join tool and at the bottom you will see which environment settings it honours. One being qualified fields... I let you explore that!

As a side note every tool displays the environment settings it honours, these can have a profound affect on its behaviour and should be the first place you should look.

  • Thanks @Hornbydd, I unchecked it and it didn't change anything, I still see tables name in the field name. So I created a new model, I added the qualified field variable, and then I added "copy rows" for the resulted join table and then I tried to connect the copy output to the add field, but it didn't accept it as an input table, it showed me "precondition" arrow! I tried "join field", but the process takes about 40 min to finish executing! Do you have any ideas? – user56216 Sep 15 '15 at 17:43
0

I was able to solve the problem. All what I needed to do is just to insert a rename tool (system toolbox > Data Management Tool > General > Rename) at the very beginning for my join table only, and I renamed it as "JoinTable", so no matter what was the original input join table it will always be renamed to "JoinTable" and everything will work.

Your Answer

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