I am trying to set up a tool that allows the user to input a field value, and was thinking SQL expression would be the way to go.
Sample -
#Selects structure by WorkOrderNumber attribute '150506'
arcpy.SelectLayerByAttribute_management("Structure", "NEW_SELECTION", "WorkOrderNumber = '150506'")
#Appends selected features from Structure to Structure_New (separate data set)
arcpy.Append_management("Structure", "Structure_New")
#Deletes the selected features from Structure
arcpy.DeleteFeatures_management("Structure")
this process selects features by a work order number and appends the selected features to a separate data set to archive, and then deletes the selected features. This works fine, what I am trying to figure out is how to set this up as a tool for other user to simply input the work order number and run it.
arcpy.GetParameterAsText()
. Also see Setting parameters in ArcGIS desktop script