OnSetDummyGeneratorWeights()

bool OnSetDummyGeneratorWeights(int inQuestionIndex, int inIteration, int[] ioWeightArray);

Description

This callback is used when you would like to have more interviews with 1 answer rather than another for random selection.

Parameters

The following is a list of parameters the functions receives 

Parameter Type Description
inQuestionIndex Int32 The question Index
inIteration Int32 The iteration index 
ioWeightArray Int32 Array The attachment index 


Return Type

bool

Example

if generator is at Q17, alter the weights of answers, 
set the alternative weights for the answer 1 & 2.
Default weight is 1. Untouched items remain 1.

function OnSetDummyGeneratorWeights(inQuestionIndex, inIteration, ioArray)
{
   var retVal = false
   {
      ioArray[0] = 9; ioArray[1] = 3; retVal = true;
   }
return retVal;
}

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

0 comments

Please sign in to leave a comment.