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

2104
1
Jump to solution
02-05-2016 10:38 PM
MichaelKowalczyk
New Contributor III

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?

0 Kudos
1 Solution

Accepted Solutions
1 Reply
WesMiller
Regular Contributor III
0 Kudos