AnsweredAssumed Answered

Script tool multiple input fields parameter...HELP!

Question asked by matthewrusso on Mar 3, 2015
Latest reply on Mar 4, 2015 by matthewrusso

I have a script tool where it takes an input table and "MULTIPLE INPUT FIELDS"


It then runs a cursor and all i want to do is print out each row with the 3 field values.  If i do 3 parameters for the fields, it works.  If i do the mutliple it wont.  I tried printing out the value and it looked like this:  fields = "ID;Lat:Long"


I guess it needs to be in list format to run through the cursor as a row?


Here is my code


inFeat = arcpy.GetParameterAsText(0)
fields = arcpy.GetParameterAsText(1)

with arcpy.da.SearchCursor(inFeat, [fields]) as cursor:
     for row in cursor:
     arcpy.AddMessage(row[0], row[1], row[2])