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.