OnGetDummyGeneratorWeights

bool OnGetDummyGeneratorWeights(inQuestionIndex, inIteration, ioArray) 

Description

This call back allows you to alter the weights of answers for the random selection of answers. It gets called for each question that the generator is generating data for. If you decide to manipulate the weights of answers, you should return true. Otherwise, if you wish for the generator to use the default weights, return false. The default weight given to each answer is 1. The array of answers is a zero-based array meaning that the weight of answer 1 is in ioArray[0] and the weight of answer 3 is in ioArray[2]. You do not have to set the weights for all answers, only to the ones you wish to alter.

Click here to learn more about the Dummy Data Generator 

Parameters

The following is a list of parameters the functions receives 

Parameter Type Description
inQuestionIndex Int The question index
inIteration Int The iteration Index
ioArray Int[] The array of the answers

 

Return Type

bool

 

Example

function OnSetDummyGeneratorWeights(inQuestionIndex, inIteration, ioArray)
{
    var retVal = false;
    if (inQuestionIndex == QRef(17))
   {

        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.