Show Navigation | Hide Navigation
You are here:
Geoprocessing > Automating your work with scripts > Scripting object: Properties and Methods > Properties and Methods

QualifyFieldName method

Release 9.3
Last modified January 19, 2010
E-mail This Topic Printable Version Give Us Feedback

Print all topics in : "Properties and Methods"


Related Topics

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.

Syntax


object.QualifyFieldName(inputFieldName As String, {Workspace} As String) As String

{} = optional

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

Examples


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)	


Please visit the Feedback page to comment or give suggestions on ArcGIS Desktop Help.
Copyright © Environmental Systems Research Institute, Inc.