A model created in ArcGIS Pro 3.1.3, including an iterator and the Spatial Join tool with the merge rule set to 'Sum' for one of the attributes, executes unexpectedly. The output from the first iteration is correct, but for the following target feature classes, the tool reverts to the 'First' merge rule (the default rule option).
The steps to reproduce produce the correct result with a new model created in ArcGIS Pro 3.5. The Spatial Join messages from the model indicate that the SUM merge rule is used for each iteration, and manually inspecting the resulting feature classes shows the correctly summed number for each polygon in the output feature classes.
Running the model tool with the Command Syntax option enabled shows the three spatial joins run in the model use the SUM merge rule for the field map:
Executing (Spatial Join): SpatialJoin Polygon_1_defaultFields InputPoints Case03436011_OutputData.gdb\Polygon_1_defaultFields_SpatialJoin JOIN_ONE_TO_ONE KEEP_ALL "Number "Number" true true false 4 Long 0 0,Sum,#,InputPoints,Number,-1,-1" INTERSECT # # #
Executing (Spatial Join): SpatialJoin Polygon_2_defaultFields InputPoints Case03436011_OutputData.gdb\Polygon_2_defaultFields_SpatialJoin JOIN_ONE_TO_ONE KEEP_ALL "Number "Number" true true false 4 Long 0 0,Sum,#,InputPoints,Number,-1,-1" INTERSECT # # #
Executing (Spatial Join): SpatialJoin TwoPolygons_defaultFields InputPoints Case03436011_OutputData.gdb\TwoPolygons_defaultFields_SpatialJoin JOIN_ONE_TO_ONE KEEP_ALL "Number "Number" true true false 4 Long 0 0,Sum,#,InputPoints,Number,-1,-1" INTERSECT # # #