Element Variable
The variable is defined for a specific element. There will be an instance of the variable for each element and it will be accessible from all the subsequent SFCodeBlocks of the analytic. The accessibility domain of a variable specifies in which analytic sections a variable can be referenced. If the variable is defined outside any nested SFCodeBlock, every SFCodeBlocks will have access to it. If a variable is defined in a nested SFCodeBlock, only following SFCodeBlocks will have access to it.
As the Call statement does not support parameters, all variables accessible at the level of the CALL statement will be accessible inside the FUNCTION. Variables defined inside a nested sequence will persist until the end of the nested sequence, and will not be available at a preceding level. That is, if the variable is defined inside a ForEach loop, a While, an If Then, etc., the variable will be accessible inside the SFCodeBlock sequences and their nested ones. Variables defined inside a ForEach loop are associated with each element.