I am trying to create a model that iterates through a directory of rasters and performs a series of raster functions and whose final output is a raster. This seems simple enough except for the fact that I want to use a truncated version of the input raster name as an inline variable to name the output raster.
As you can see from my model, my approach to this is to use the Calculate Value tool on the Name variable that is an automatic output of the Iterate Rasters iterator. the expression I'm using in Calculate Value is "%Name%"[0:7]. The result of running this model is that the first two output rasters in the iteration process seem to be processed correctly and written with the correct output names. After the first two, however, the first output raster is constantly overwritten by the rasters passing through the model in subsequent iterations. I'm wondering if this is because the Calculate Value tool is not actually iterating because, while the Name value is a precondition of the Calculate Value function, it is not actually and input and therefore does not trigger Calculate Value to iterate with the rest of the model. Any help with how to force it to do this or other means to the same end would be greatly appreciated!