WorryFree Computers   »   [go: up one dir, main page]

How to get form questions to be rows for each question

I have an app that will have multiple forms based on a column value. When you select a record it uses the value  of one of the columns to present (Form A, Form B, or Form C). The user then will answer questions on each form. I am needing to have each questions that is answered as a row rather than a column. My thought is that I will have a "Question table" which will store an ID and the text values of what the questions are. Then there will be a table/sheet that will have each questions response as a row.

 

Any help with this would be much appreciated.

Solved Solved
0 9 251
1 ACCEPTED SOLUTION

Then you could do it with the combination of  Bot and actions (Execute an action on a set of rows) to create those rows.

View solution in original post

9 REPLIES 9

Not 100% sure what you are trying to build. I assume you have 5 tables, questions, answers, formA, formB and formC. Then in the Answers table you have one column for formA, another column for formB and same for formC. The questions are coming from a questions table depending what you have selected when you opened the answers_form view. And then finally you would like to save them to formA, B and C tables. Is this right?

So I am probably not explaining this well. Let me try again. This App is to perform quality evaluations on task work that has been completed by employees(data comes from outside the app).

There is TASK table that has each record of all the tasks completed.

When I click on a record it should:

  1. Take that ID and some fields to the EVAL table
  2. Update that status on TASK from Pending to Complete
  3. Present a Yes/No questionnaire and log each question/answer as a row on ANSWER table  

 

I can figure most of this process out. My main issue comes from: Getting the record that was just clicked from TASK to open the questionnaire(using the EVAL_ID) and then have each question/answer recorded to a new table. While the form is getting questions from a lookup table.

 

mlowman_1-1715967125013.png

 

One way to build this.. first open the new evaluation record with the LINKTOFORM() action. When that is saved, that triggers a Bot and adds those new records with AppSheet API/json. You need one Bot per your Form table.

Unfortunately my company is blocking us from using the API.

Then you could do it with the combination of  Bot and actions (Execute an action on a set of rows) to create those rows.

@AleksiAlkio  - So I was able to get the questions/answers to write into individual rows. On my view which presents the questions I have two actions one for Yes(which writes yes) and one that is No(which writes no). I am then pulling in the ID of the record from the EVAL table by getting the latest ID where its the current USEREMAIL().

My next problem is getting the next question to pop after the first one gets answered/actioned.

Eval:

mlowman_0-1716389635356.png

QUEST(Just a reference table that stores all questions to be asked{}gets filtered based on a value from a column}

mlowman_1-1716389702650.png

ANSWER

mlowman_2-1716389766518.png

 

 

 

So it sounds like you are saying that you need all the answers to a given question to be a row, but I can't understand why you need this.  You could have a summary table with any number of columns that are providing summary analysis of each question showing you counts, sums, averages, etc for each question and/or for each user.

I do not want to store data having questions as columns this can become very large/complex as new questions get added. This also creates issues downstream because its an entire schema change every time a question is added.

If all your questions are text answers, this should work… Imagine you have a table that stores questions as text.  You also have a table of answers. The answers table stores the user, a calculation that displays the question, a response text field, and a column that indicates the conditions under which this question should be asked. The view for answering questions isn’t a form but a table view with one column showing the question and the response field open for quick editing. 
The sequence of questions to ask can be stored as an enumlist in another table.  A calc in the answer table may be needed to help work out which questions and the question ordering. 
If you need multiple types of questions, it will get much trickier, and a web app built from scratch may prove much easier  and faster approach. Chat gpt is your friend at that point.  But if you can constrain your questions to text-based or one other single data type,  this approach should work in appsheet.

Top Labels in this Space