AnsweredAssumed Answered

parameter contents too long in python geoprocessing command

Question asked by Georgie.Cassar on Sep 21, 2015
Latest reply on Sep 21, 2015 by Georgie.Cassar

I have a script that uses the arcpy.MakeQueryTable_management command to join a spatial with a non-spatial table.

 

It works fine until I add lots and lots more fields into the variable that lists all the fields I want to include.  Once it exceeds 255 characters in length, it error's......Understandably as a string can only hold so much.

 

ie:  In the command   arcpy.MakeQueryTable_management(tableList, lyrName,"ADD_VIRTUAL_KEY_FIELD", keyField, fieldList, whereClause)

 

The fieldList variable contains the many fields.

 

Works when fieldlist looks like this

fieldList = ['Cadastre_Joiner.shape', 'paetbl_CoolingTowers.ApplicationNo', 'paetbl_CoolingTowers.PropAddress']

but breaks when I add lots more field names to this variable exceeding 255 characters.

 

Does anyone know a better way I can make this work using different processes or methods to enter the field name values ?

Outcomes