Dim resPortfolio As Portfolio Dim resItem As PortfolioItem Dim ProfileColumn as Profile Dim ProfileRow as Profile Dim currQuestion as ProfileQuestion ' Examples of reordering responses of questions added to the row profile - Examples use specific questions, prefer using generic methods ProfileRow.Add(^Wave x SEG^,{1;7;13;19;2;8;14;20;3;9;15;21;4;10;16;22;5;11;17;23;6;12;18;24}) ' 1. Add question and order of its responses ProfileRow.Add(S2,S2.Responses.Index.Shuffle() - S2.Responses.Count) ' 2. Add question and shuffle its responses (remove 'Not asked') currQuestion.Question = Country Dim arrNewOrder = {2;5;6;4;1;3} ' 3. Specify order of responses Dim k ' 3. Loop through all indexes of your new order array (arrNewOrder) For k = 1 to arrNewOrder.Count Dim myResponses as ProfileItem myResponses.Type = 0 myResponses.Response = arrNewOrder[k].ToNumber() ' 3. Add responses according to the order in arrNewOrder currQuestion.Add(myResponses) Next k '---------------------------------------------------------------------------------------- ProfileRow.add(currQuestion) '---------------------------------------------------------------------------------------- Dim i For i = 1 to Survey.Questions.Count If Survey.Questions[i].Responses.Caption Has {"Stella Artois"} and Survey.Questions[i].IsCalculated = False Then ProfileRow.add(Survey.Questions[i],{8;7;6;2;1;3;5;4}) ' 4. Isolate non-calculated questions having response "Stella Artois" and reorder Endif Next i resItem.SetType(1) resItem.SetTitle("Reorder Responses") resItem.TabDef.ReadTabTemplate("Askia Simple") resItem.TabDef.Rows.add(ProfileRow) resPortfolio.add(resItem) resPortfolio.Save(Survey.Directory + "8. Reorder responses and add questions with specific responses to rows.xml") resPortfolio.Open()