I have table like this:
From [CSVFILES.CSV] ();
The fields Questionx (like this: You have a car?), is a simple anwser (Yes/No)
I must "transform" the fields named "Questionx" to Question and renamed field Questionx to anwser.
I try someting like this:
1) I Create a map table from Question LOAD * INLINE [QuestionId, Question ....];
2) LET = QuestionId = 0;
FOR EACH vQuestion In $(vQuestions)
LET = QuestionId = QuestionId + 1;
$(QuestionId) as QuestionId,
FieldValue(FieldName(FieldNumber('$(vQuestion )', 'BASE'), 'BASE'), RowNo()) as Anwser
WHERE FieldName(FieldNumber('$(vQuestion )', 'BASE'), 'BASE') = '$(vQuestion)'
But, The anwser field return null.
can anyone help me?
Marcus this information is related to an investigation of these we respond when we are approached by field researchers. Like this:
|You Have a Car?||YES / NO|
|You Have a Bike?||YES / NO|
|Do you drink a beer?||YES / NO|
|What is your favorite beer?||XYZ K2|
CSV files bring the same information in the same way, that is, the question is the field name.
What I want is to create a new table with a QuestionID field where I can identify what's the question (1, 2, 3 etc) and this answer.
I have a table where the questions are mapped.
An example of the table is: