I am experiencing this same issue. Anyone have an answer for this yet?Thanks!Chris
Same issue here. I have 17 division names in a string field [Division]. I have 'Iterate Field Values' iterator with SQL Expression selected as data type. I want the model to take each unique value in [Division] and use it in the next tool 'Select Layer By Attribute' as the expression [Division]='%'I could be wrong, but Isn't this how SQL Expression in this iterator is supposed to work?I also tried an inline variable in my 'Select Layer By Attribute' expression: [Division]='%Value%' and set the Iterator data type back to string. The selection came out: [Division]='1'. When really it should be something like [Division]='Lakeshore'I get the same generic Value=1 for every different type of field in my feature class, no matter if it is string, long, short, float, double, etc. Even if the iterator is outputting the number of iterations instead of the actual value it should still show me the number of unique values (in the case of [Division], 17) instead of 1. But I thought the iterator was supposed to output the actual unique value of the field specified?
Hi Gabe,without having a copy of your model, I can't tell why you get what you get.Barbara
Will this attachment suffice?
Hi Gabe,Thanks so attaching the model.Your first Select Layer by Attribute uses the output, i.e., Value from Iterate Field Values, yet the iterator has not yet run.Also, do you intend to iterate every process every time the iterator outputs another Value?Barbara Bicking
Was there ever a resolution to this issue?I've got the exact same problem. No matter what the data type of the field, the resulting value of VALUE is 1. I have an input table with a 'Usercode' field of string values. According to Help, the iteration should select every unique value in the "Usercode' and pass that string value on.
I stumbled upon the solution when I decided to just let my model run to see what happened. Apparently, the first iteration used the value '1' and all my selections were empty because of this. After the model finished for the value '1' it started to iterate through the actual values. Worked perfectly!
you can eliminate the initial run by constructing your model such that the iterator is the first process to run, thus it gets initiallized to the value you want.
I was wondering if anyone has figured out a work around for this issue. I am running into the exact same problem.
A simple model - Iterate field value (Name)- use the string output value to run a Make Feature Layer (Name =%Value%)
It will run and immediately stop with the error message Name = 1 does not exist. Examining the model after it ran, it shows that the Value output for Iterate field value now equals 1 even though that value does not exist in the data.
I even tried running the Iterate field value by itself after this happen and it gave me the same result Value = 1.
A this point I closed everything down, opened it back up, ran the same model with no changes and it worked, once, and then went back the Value = 1 issue.
Any help with this would be appreciated.
Thanks
Hi, Carel Kotze
Thanks!
Shitij
Here's an image of the model, table and parameters.
What bothers me is the inconsistency of the model, it will run fine one moment and then switch to the problem I have mentioned above, without me changing anything.
The way I managed to make the model work the last time is to change the Input value from the drop down option (the layer is in my table of contents) to the hard drive location using the browse button.
That fixed the problem without me having to change anything else in the model.
The image
What you are describing is an inconsistent behavior and a bug with reading a layer, unfortunately i am unable to reproduce it with the current version. Which ArcMap version do you have?
I'm having the same issue with ArcGIS Pro
Hi ShitijMehta, Yes, I am still facing this issue. Here is a model that has this issue. You'll need to try it with your data. I would love it if you can fix this issue. I am on ArcGIS Pro 2.6.1.
Lara
サインインしたメンバーは投稿、更新のフォローなどができます。初めてですか?無料アカウントを登録してください。
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.