1

I am using Iterate Field Values to Iterate my Model through a list of Strings (DBF-File). However, the Field Values-Iterator will always sort my Field by alphabet (ascending). It does not matter how the rows in the *.dbf are ordered.

Is it possible to run the model using a different sorting method?

Example of dbf-file:

house
mill
water
tree
cafe
garden

.. will run as

cafe  
garden  
house
mill
tree
water

I would like to run the Model by the first sequence of strings, not the second one. Is this possible? I tried adding a second column with numbers from 1 up to x, but the Iterator ignores this field.

  • I think maybe that it iterates based on OBJECTID. Do the object ID's correspond to alphabetical order? If this is the case, I may have a solution. – Tangnar Jan 23 '15 at 15:37
  • Can you expand more what the end need is for the sorted list? – artwork21 Jan 23 '15 at 20:33
  • Thank you Tangnar and artwork21. The iterator will always sort ascending by the field I am iterating over. It does not matter how the dbf or shapefile is ordered, or whether I add another Field with ascending numbers in correct order. – Alex Jan 26 '15 at 19:02
  • The need for the ordered list the following: a group of students will use my model to process a list of strings. The strings are ordered by importance. Because the students will not be able to process all strings from the list during the course, I would like the model to start with the most important, descending to less important strings. This does not match with alphabetic numbering. – Alex Jan 26 '15 at 19:03
1

Looks like you have discovered a quirk of the Iterator. There is no indication in the help file that the iterator sorts the field. So the only way I can think of doing this is to add a field to your dataset and you number the rows in the order you wish to visit them. You then iterate over that field.

  • Thanks a lot for answering. I am sorry for my late reply. @Hornbydd: I think you're right and there is no way around the Auto-Sort function. But how do I Iterate over the new field with correct numbers [Field 1] and read [Field 2] into inline variable substitution (%variableString%). Is this possible? – Alex Jan 26 '15 at 18:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.