IUserAccessiableSetAnswerIter Method (Int32, String, DVar) |
Relevant for all question types that are part of an iteration. Sets the value of an answer/answers in question inQuesIdx with inValues in the specific nested loops iterations state.
If the question is of type Multiple Selection or a grid (Single Choice Grid, Numeric Grid etc) it will set the relevant answers with the corresponding values in inValues. First answer will be set with the first value, second answer will be set with the second value etc.
Namespace: SurveyToGo.UserLogic.InterfacesAssembly: UserLogicInt.Pocket (in UserLogicInt.Pocket.dll) Version: 1.0.4.0
Syntax bool SetAnswerIter(
int inQuesIdx,
string inIter,
params DVar[] inValues
)
Parameters
- inQuesIdx
- Type: SystemInt32
the question index - inIter
- Type: SystemString
the nested loops iteration indexes list - inValues
- Type: SurveyToGo.UserLogic.InterfacesDVar
the values list to set
Return Value
Type:
Boolean bool
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.
Question index 10 is a mutliple selection question with 5 answers, located inside loop chapter C.
SetAnswerIter(QRef(10), CreateMultiIterationsString(2, 3, 1), 2, 3, 5) will set answers 2, 3 and 5 in question 10, while loop A was in iteration index 2, loop B was in iteration index 3 and loop C as in iteration index 1.
See Also