ArcGIS Desktop

  • ArcGIS Pro
  • ArcMap

  • My Profile
  • Help
  • Sign Out
ArcGIS Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS Desktop

A complete professional GIS

ArcGIS Enterprise

GIS in your enterprise

ArcGIS Developers

Tools to build location-aware apps

ArcGIS Solutions

Free template maps and apps for your industry

ArcGIS Marketplace

Get apps and data for your organization

  • Documentation
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

ArcMap

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • Extensions

Import Variables By Attribute Join

Available with Business Analyst license.

  • Summary
  • Usage
  • Syntax
  • Code sample
  • Environments
  • Licensing information

Summary

Joins external variables to the Territory Solution by attribute intersection.

Usage

  • A String, Integer, SmallInteger, Double, Single, Date or OID field from an Alignment Layer can be used as in_field_territories.

  • A String, Integer, SmallInteger, Double, Single or Date field from an importing table can be used as in_field_table.

  • Any Integer, SmallInteger, Double and Single field from an importing table can be used as in_variables.

Syntax

arcpy.td.ImportVariablesByAttributeJoin_TD(in_territory_solution_layer, in_table, in_field_territories, in_field_table, in_variables)
ParameterExplanationData Type
in_territory_solution_layer

The Territory Solution layer to which to import variables.

GP TD Layer
in_table

The Source table from which to import variables.

Table
in_field_territories

The Join field from Alignment Layer.

Field
in_field_table

The Join field from the import table.

Field
in_variables
[in_variables,...]

The Set of fields to import from the input table.

Field

Code sample

ImportVariablesByAttributeJoin_TD example (Python window)

The following Python window script demonstrates how to use the tool in immediate mode.

import arcgisscripting
gp = arcgisscripting.create()
gp.ImportVariablesByAttributeJoin_TD("new layer", "C:/database.lyr", "ID", "ID", "AREA;TOTPOP_CY")
ImportVariablesByAttributeJoin_TD example 2 (stand-alone script)

The following stand-alone script demonstrates how to use the tool.

# Import system modules
import arcgisscripting
gp = arcgisscripting.create()

# Set local variables
solution = "new layer"
table = "C:/database.lyr"
joinFieldAlignmentLayer = "ID"
joinFieldTable = "ID"
variables = "AREA;TOTPOP_CY"

# Execute tool
gp.ImportVariablesByAttributeJoin_TD(solution, table, joinFieldAlignmentLayer, joinFieldTable, variables)

Environments

This tool does not use any geoprocessing environments.

Licensing information

  • Basic: Requires Business Analyst
  • Standard: Requires Business Analyst
  • Advanced: Requires Business Analyst

Related topics

  • An Overview of the Setup Territory Solution Toolset
  • Create Territories
  • Create Territory Solution
  • Import Variables by Spatial Join
  • Import Territories From Database

ArcGIS Desktop

  • Home
  • Documentation
  • Support

ArcGIS

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS
  • ArcGIS Developer
  • ArcGIS Solutions
  • ArcGIS Marketplace

About Esri

  • About Us
  • Careers
  • Esri Blog
  • User Conference
  • Developer Summit
Esri
Tell us what you think.
Copyright © 2021 Esri. | Privacy | Legal