AnsweredAssumed Answered

Is it possible to use Python tool with search cursor as a subroutine within a modelbuilder tool using an iterator?

Question asked by msk05004 on Feb 5, 2016
Latest reply on Feb 6, 2016 by wwmiller68

I have a model with an iterator that produces a selection of records each iteration.  I would like to get the values of a field from every record, and compile the values into a single coma delimited string.

 

I have attempted to use an embedded python tool to use a search cursor over these records, but it does not seem to work.  I get a runtime error: cannot open '<<field name>>'

 

Is it is possible to run a python script tool with a cursor as a sub tool to loop through the selected records to get the field values and append them to the string?  Is there a better way of doing this?

Outcomes