I am trying to write my getValues to a text element loop, but I want there to be two results per line before going to the new line. I am having trouble figuring it out? I think I might new a while loop perhaps instead of a for loop, and probably need to use next() somewhere? But that seems to just loop through each name and put one result instead of all four.
I don't want this: Anna I want this: Anna Ben
Ben Charlie Dora
Charlie
Dora
I don't know what to use in here to achive this.
rows = arcpy.SearchCursor(Layer) textValue = "" for row in rows: textValue += row.getValue(Value1) + '\r\n' ParcelText2.text = textValue del rows
Solved! Go to Solution.
You are welcome!
Matthew,
I wanted to recommend for future using of cursors that you use the new data access cursors(arcpy.da.SearchCursor e.g.). They are significantly faster than the old style cursors you were using in your code. The parameters and syntax are somewhat different from the cursors you were using, but still easy to use.
Here is the link for the new cursors versus old cursors.