Hi gayatri,
See if this works out for you.
1.jpg: Shows how the overall Process Diagram looks like
2.jpg: 'Read All Text File' will get the contents of Notepad into the 'TextFromNotepad' data item
3.jpg: Split Lines on 'TextFromNotepad' and generate the 'Split Values' output collection
4.jpg: Add a new column called as 'Question' to the collection where all your questions will be stored.
Similarly add another stage to add the 'Answer' column (in case you need it
).
- Then loop on the 'Split Values' collection
5.jpg: Then add a Multi Calc stage to separate out the Question and Answer from the Original value.
This is how they look if you are not able to see in the screenshot
Left([Split Values.Value], InStr([Split Values.Value], "?:")-1)
Right([Split Values.Value], Len([Split Values.Value])-InStr([Split Values.Value], "?:")-1)
If you have Leading and Trailing spaces in your question or answer then you can use the Trim function too.
6.jpg: This is how the Output of the Split Value collection will look like after running the process