Field mapping logic in single selection question
The field naming convention is very consistent.
A Single Selection Question can have three possible fields.
For primary selection, the column looks like QBQ.QID”Row”RowIndex, for example “Q1Row1”
For secondary selection, the column looks like QBQ.QID”SecRating”RowIndex, for example “Q1SecRating1”
For comment, the column looks like QBQ.QID”Comment”RowIndex, for example “Q1 Comment 1”
The RowIndex is always 1 in a Single Selection Question.
Single Selection Questions always have one column corresponding tothe primary selection.
To determine if a comment column is used for a Single Selection Question, use the following logic:
(BlueWS.TypeRatingMatrix)BQ.CommentReq_Scale1 contains an array of strings, if one of the values is “1” that means a column is required to store comment.
If “Choose 'Other, specify' selection’’ is checked in a Single Selection Question, one of the values in CommentReq_Scale1 must be “1”
To determine if there is secondary selection in a Single Selection Question, use the following logic:
(BlueWS.TypeRatingMatrix)BQ.SecondRating contains the captions for secondary selection, if its length is bigger than 0, this means secondary selection is used.