Array,Data Table and CSV

I am posting 3 image and my XMAL file.
Actually i need to fetch data from Image 1 and Image 2, That i have done.
However i am getting stuck while putting that data into Array or Data table because here scenario is:

  1. If more than one ans is true like shown in Image 3, then raw value( Against column "Question Type (multiple-choice or multi-select) " should be multi-select and if only one ans is true then it should be multiple-choice. Here how to add “multiple-choice or multi-select” within the array?
  2. There might be possibility that some times, options of question could be A,B,C,D,E,F or A,B,C,D,E or A,B,C,D. How to manipulate this, while creating list,array or writing value in data table or CSV.
  3. if Ans A is true then i need to write 1, if ans B is true then i need to write 2 and so on.

Please guide me how to proceed. Main.xaml (36.9 KB)

I have also uploaded my XMAL File.
Any help please?

Please someone suggest, how to proceed?

Buddy @gupta.rak1984

Actually you workflow looks good may i know what was the problem that you faced in adding data to the list that you created along the workflow, weren’t you able to segregate the details or what was the issue

I think the issue is with the way split is used to find each option, may i know what was the text in RawQAns before been splitted

Cheers

Sorry for my bad explanation. let me put everything again

  1. Depends upon answer, I need to insert multi choice or multi in column 2 . Like if correct ans is A,B then multi choice or if correct ans is C then multiple choice.
  2. A question can have 6 options( Not always). so if question is having only 4 options A,B,C,D then value of CSV column option 4 and option 5 is getting replaced with the ans.
    In simpler way, i have to read the image 1 and image 2 and accordingly put value in CSV as shown in image.
    Did i explain by doubts?