QualifyFieldName method |
|
|
Release 9.3
Last modified January 19, 2010 |
Print all topics in : "Properties and Methods" |
Note:
This topic was updated for 9.3.1.
Prefixes a name string with the <database>.<username> if required. This method is used in scripting only.
| Part | Description |
| object | The instantiated geoprocessor object |
| InputFieldName | The name of the field that will be prefixed |
| Workspace | Specifies the workspace in which the field can be found |
import arcgisscripting
gp = arcgisscripting.create(9.3)
try:
gp.Workspace = "Database Connections/Calgary.sde/LegalFabric"
# Create the layer for the selection.
#
gp.MakeFeatureLayer("taxparcels","parcels")
# Join the parcel updates table using parcel_id field.
#
gp.Addjoin("parcels", "parcel_id", "parcel_updates", "parcel_id")
# Qualify the identically named fields.
#
id = gp.QualifyFieldName(parcels, "parcel_id")
update_id = gp.QualifyFieldName(parcel_updates, "parcel_id")
# Select the parcels using the qualified names.
#
gp.SelectLayerByAttribute("parcels","New_Selection", id + " = " + update_id)
# Calculate the update flag to be true for the selected parcels.
#
gp.CalculateField("parcels", "updateflag", "true")
except:
print gp.GetMessages(2)