Hi guys,
I have another problem with CalculateValue in ModelBuilder.
I have a shp with polygons. Each polygon has one attribute which talks about being a part of group.
So attributes lookes like this
When i run my model I would like to have an output with that value (Group field) in it - something like "Output_1".
I tried different ways for expression in Calculate value tool but no success....
Solved! Go to Solution.
Just use Iterate Feature Selection (Iterator) grouped by your GROUP field, then use inline variable substitution with %Value% from the iterator for the Copy Features output e.g. Copy_Features%Value%.
Would help if you explained the process/model and what tool the output is formed from - are you using iterate feature selection with it grouped by that GROUP field? Then what is that iterator connected to? No idea how to answer your question unless you give more detail.
it is a SHP with lot of polygons (more than 2000) ..... each of them has own CODE attribute and then these polygons are in those GROUPS. so some of them have GROUP value 1, another have 2 and so on...
model is pretty basic - input shp, select by attribute and then copy features - i need those polygons belonging to the group value 1 in their own SHP, and so on......because there are lots of groups (so in the end there will be many shp´s) I would like to improve output name of shp by that group value.
Just use Iterate Feature Selection (Iterator) grouped by your GROUP field, then use inline variable substitution with %Value% from the iterator for the Copy Features output e.g. Copy_Features%Value%.
that´s much more better and simple than "calculate value"! thank you 🙂