0

I have a rather large model that works fine with the exception of one part (See Figure 1). What I can't seem to figure out is how to select all "NULLs" (for example) in a field and then perform a calculation on the NULLs selected, then move on to the next field listed in the "Field" variable. It just runs through the first Field then stops. Any ideas would be helpful. Figure : Model subpart

4
  • You don't have an iterator in that model, but I see stacked parameters under Field. Are you trying to feed multiple fields into the SLA tool for a sequence? Note if you're wanting to iterate just this part and it's part of a larger model, you may (will probably) need to split this part out to a submodel with an iterator, and then call that submodel within your main model. – Chris W Mar 31 '15 at 5:24
  • I tried a couple of different iterators but nothing seemed to work. So I initially added the stacked parameters to the CF tool and that worked but only allowed me to select one field at a time. So then I backed up one step and wanted to see if I could incrementally select fields, but it would appear not – Jeff Mar 31 '15 at 11:28
  • As Fezter said, a CF tool can only operate on one field at a time. We kind of need to see the way you have those two tools configured. I think you're trying to do too many things at once, or rather in too few steps. Is the goal to find all null values in several fields and do the same calculation on them? I think you'll need to duplicate what you've shown for each field as Fezter says. From a quick look there isn't an iterator for fields, but there are ways to do it: gis.stackexchange.com/questions/54771 – Chris W Mar 31 '15 at 17:37
  • Find the (in this example) NULLS in Field A - Perform calculation; move to Field B. Find NULLS in Field B - Perform Calculation, etc.... However If Fields A and B have the same number of NULLS and in the same field cells I can set a stacked parameter and run the CFT on both or more fields without having to add multiply CFT's. One CF tool will run one or more field calculations. – Jeff Mar 31 '15 at 20:32
1

The Calculate Field tool works for only one field at a time. You'll need to connect another Calculate Field at the end of that model.

Repeat for every field you need to calculate.

1
  • I wonder if its the other way around as I can set the "Field" variable to a stack of inputs and run the "Calculate Filed" several times – Jeff Mar 31 '15 at 11:22

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.