Hi!
I have a checklist survey with hundreds of questions. To have them all together in the S123 form I would need to have a table in db with hungreds of fields where each question corresponds to each field. It is undesirable.
Another approach would be to have each question as a record in a child table with just three fields: globalid, question, answer. This is better from data model perspective, but makes the S123 form very akward as a user would need to add a separate repeat for each question and could not see them all together.
I am trying to see if there is a way to combine advantages of these two approaches, having questions in the survey all together but get them submitted as repeats.
My idea is to create a list of dummy questions of 'null' type. And then to use a JS function to compile those answers into a repeat-like JSON item. So it immitates repeats in a JSON format at data submission.
The problem is that S123 puts "" around the JSON string returned by my JS function interpreting it to be a text (see the example below). Is there any way to take away these quotation marks?
I know that I want to go against S123 rules here, but we really need a solution. Please, let me know if you see any other way to do it.
"RealRepeat": [
{"question": "question_1", "answer": "answer_1"},
{"question": "question_2", "answer": "answer_2"},
],
"MyRepeatImmitator": "[
{"question": "question_1", "answer": "answer_1"},
{"question": "question_2", "answer": "answer_2"},
]",