IUserAccessiableGetParentIterationIndexPath Method |
This function gets a level number within the nested loops and returns a list of the iteration indexes from the highest loop level (the most outer one) to the given level.
Namespace: SurveyToGo.UserLogic.InterfacesAssembly: UserLogicInt.Pocket (in UserLogicInt.Pocket.dll) Version: 1.0.4.0
Syntax string GetParentIterationIndexPath(
int inParentLevel
)
Parameters
- inParentLevel
- Type: SystemInt32
an integer indicating the loop level (how much levels to go up from the loop I'm currently in)
Return Value
Type:
String String
Examples
Loop chapter C is nested in Loop chapter B that is nested in loop chapter A. All loops chapters iterates a maximal number of 3 iterations each.
Loop A is currently on its second iteration (iteration index 2). Loop B is currently on it's first iteration (iteration index 1), and loop C is on it's third iteration (iteration index 3).
Calling GetParentIterationIndexPath(1) from inside Loop C, will in this case return this list: "2, 1", as the most outer loop (loop A) is on iteration #2 and the next loop (loop B) is on iteration #1, and loop B is also the given level (1) from where the code is at.
Calling GetParentIterationIndexPath(0) from inside Loop C, will in this case return this list: "2, 1, 3", as the most outer loop (loop A) is on iteration #2, the next loop (loop B) is on iteration #1, and the next loop (loop C) is on Iteration #3, and loop C is also the given level (0) from where the code is at.
See Also