Hi all,
I'm trying to get some good use out of the Iterator tool in ModelBuilder and set up some processes to simplify my workflow - and am just having a bit of trouble getting the logic right on my process.
My ultimate goal is to:
- iterate through one of our Hosted Feature Services in AGOL of watersheds
- select each one by its respective Name (using the Name field in the Group By Fields parameter)
- For each selected watershed, use select by location to capture points from a separate subset of data that fall within the watershed's boundaries
- Export the attribute table of the select by location output to an Excel Sheet.
So I can ultimately create a table that has the attribute table of all those features within each watershed.
To test that my iterator is selecting things properly I'd thought I'd set the output selection connected to the Feature Class to Shapefile tool to see if I can at least get an independent shapefile of each selected watershed from the iterator.
However, I only end up with a single output shapefile which doesn't contain the name of the watershed from the Name field - just "I_0_Name". I've tried setting the output location to use the inline variable "%Value%" but I still only get one shapefile in the output with the name having "%Value%" as a string in the name - not the actual name of the selected feature.
I'm definitely missing something or misunderstanding the purpose of the Iterate Feature Selection tool - if that tool can't accomplish what I'm considering, is there another tool that would work better?
Thanks!
Henry