AnsweredAssumed Answered

Update Cursor to enter name string in attribute field

Question asked by jdrvar on Jul 25, 2013
Latest reply on Jul 25, 2013 by jdrvar

I need to modify my script to have the user's name entered into the MAPPER attribute field.  Currently, the script enters inputName into the attribute field.  I have a Parameter setup to Enter YOUR name as a string, but the script overwrites the name entered.  I want the Enter YOUR Name string the value to be entered into the attribute table, not the inputName.  My script is shown below.  inputName is listed as the 2nd string, since this is only part of my script.  I have another string set to 0.

#Import import arcpy  #Name Variable inputName = arcpy.GetParameterAsText(1)  #Permits the user to enter their name into the MAPPER field try:          cursor = arcpy.da.UpdateCursor("Parcels", ["MAPPER"])  for row in cursor:   cursor.updateRow(["inputName"])  arcpy.AddMessage("name entered")  del row  del cursor  except:  print arcpy.GetMessages()