Dynamic data input based on user selection

I’m looking to build sets of several large data input forms.
To keep track of the question sets and answers and for further analytics I would like to use table structure similar to below:

Question DIM table:

SurveyID QuestionID QuestionText
R1 R1Q1 Survey question text
R1 R1Q2 Survey question text
R1 R1Q3 Survey question text
R2 R2Q1 Survey question text
R2 R2Q2 Survey question text
R3 R3Q1 Survey question text

Answer table:

SurveyID ResponseID QuestionID AnswerID AnswerText
R1 1 R1Q1 R1Q11 Survey answer text
R1 1 R1Q2 R1Q21 Survey answer text
R1 1 R1Q3 R1Q31 Survey answer text

Say a user chooses R1 survey, would it be possible to:

  1. Create dynamic forms, from ontology/workshop, that can populate the question names, options?
  2. Allow write back at a row level for each answer rather than in the long-form suggested tables?
2 Likes

This is very doable in workshop. You should create a survey object type and then a question object type which links one-to-many. The user could select the survey and then you do a search around and populate a loop layout. I’d recommend having a property type like Question Time which is one of short text, long text, numeric etc to inform how the elements of the loop layout should render.

I would have a Submit Answer action which creates an answer object linked to the question object.

For your second question, are you asking if you could have each answer as a different column? This is challenging as the ontology requires a static definition of properties, but you could do the ‘pivot’ in a TS function when you want to display this in a workshop module/object view. You could also use a Notepad Template to generate a document with all the answers.

Hi Ben,

Thank you for answering. For the survey part - does this work would dropdown or multiple choice selections? I assume it would be then linking a third object to to the questions to generate the options

Hi,

You could have Question Type (I think I made a typo in my first response) include values like single select or multi select which could pull up the right layout type. Then you could have another property of options which is a string array which is null for other question types, but available for this one.

I would do the different layout types as tabs or sections which you could hide on the loop layout.

Good luck!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.