In the snippet of code below, I'm attempting to create variables, then pass them to the arcpy.JoinField_managment tool:
#Set join parameter variables
inFeatures = arcpy.GetParameterAsText(0)
inField = arcpy.GetParameterAsText(1)
joinTable = arcpy.GetParameterAsText(2)
joinField = arcpy.GetParameterAsText(3)
arcpy.MakeFeatureLayer_management(inFeatures,"inFeatures_lyr") #make feature layer from feature class
#Join road feature class to buffer distance table
arcpy.JoinField_management("inFeatures_lyr", inField, joinTable, joinField)
The result appears to actually append the field values from joinTable
to the attribute table in inFeatures_lyr
. I've tried replacing the variables with hard-coded values and get the same result. I can't remove the join and and can only get the fields out by deleting them as I would any other field in the feature class. How do I structure this to create the join correctly, do my geoprocessing, then remove the join programmatically?