Using QREF to Rotate Attributes Across Various Screens

You can rotate a series of questions across multiple grids.Using the !QREF command, you can precreate the rotate blocks and then call them in for display using another !QREF command.When presented, the questions will be displayed evenly across the number of gridsdefined.

The syntax for!QREFstatements is:

 {!QREF,<type>,<options> }

{!QREF,N,<number of blocks to display>,<total number of questions> } – To start a !QREF section, specify the number of blocks and questions. The maximum number of blocks is 20. The maximum number of questions is 400.

{!QREF, P } – “Puts” the questions into the QREF Array (Starts the QREF Block)

{!QREF,E } – Ends a !QREF block (Ends the placement of the questions)

{!QREF,G,<block number> } – “Gets” each of the QREF blocks/grids to display on the screen

{!QREF,C } – Clears the current !QREF array

NOTE: If the list being used is based on skip patterns, then you need to make sure you include logic to determine how many screens need to be presented and build skips accordingly.

Qrefstatements will display your attributes as evenly as possible across all delegated screens.

For Example: You have 31 attributes and are displaying them on screens 1 through 5, you will get 6 attributes on screens 1 through 4 and 7 attributes on the last screen.

 {!commentThis section shows how to rotate attributes (questions) across multiple screens. You use the QREF,N command to define the number of screens and the number of questions.   Use the QREF,P command to place the questions in the QREF array.   Use the QREF,E command to end the placement of questions. Finally, use the QREF,G command to present the questions to the respondent.}{!QREF,N,5,50 } ''define qref - first the number of screens and then the number of questions{!QREF,P } ''put the following questions in the qref array{!ROTATE,S } ''do your rotates here for the number of questions>REPEAT $A=01,...,50;{ ATTRIB$A:Attribute $A!FIELD1 -Excellent*2 -Very Good*3 -Average*4 -Fair*5 -Poor* }>ENDREPEAT{!ENDROTATE }{!QREF,E } ''end qref block{!SYS,EXECUTE_COMPILER_DIRECTIVE_BLOCK,DEFAULT } >REPEAT $A=1,...,5; ''number of screens{ ATTRGRID:!GRID }{ ATTRDISP:Please rate the following attributes on a scale from 1 to 5 where 1 is excellent and 5 is poor.<br/><br/><table><tr><th rowspan="2" valign="middle" width="50%">Attribute</th><th width="10%">Excellent</th> <th width="10%">Very Good</th><th width="10%">Average</th> <th width="10%">Fair</th> <th width="10%">Poor</th></tr><tr><th>1</th><th>2</th><th>3</th><th>4</th><th>5</th></tr>!DISPLAY }>REPEAT $B=1,...,10;  ''how many attributes per screen{ Q14_$A$B: !QREF,G,$A } ''call the specific !qref screen you want (in this case, 1-5)>ENDREPEAT{</table>!DISPLAY }{!ENDGRID } >ENDREPEAT