webform with radio button

webform with radio button

  

Hi,

I'm comparing some (low) coding platforms. With VS + angular + bootstrap I can easily build a webform with lookupfields to other tables). With Outsystems also no problem at all. But I also have -same webform- a couple of questions with multiple answers (users select an answer through radiobuttons). The value of the answer (text) can be saved tot a database table, What is the easy and fast way of doing this in Outsystems? Like a questionaire/survey.


Regards, Harry

  

Hi Harry,

I'm not entirely sure I understand your question. Do you want to know how to create such a survey in general, or specifically how to save the text answers to an Entity?

Hi Kilian,

in general. 



Hi Harry,

Well, it depends on how complex you want to make this. E.g. whether you want a back-end to maintain the questions etc. But in general, I'd have an Entity "Question" that contains the questions, and an Entity "Answer" that contain the possible answers, having a QuestionId as a foreign key.

To show the questions on screen, you could use a TableRecords with inside each Row a Web Block that displays a single question + the answers (in a List Records widget). When an answer is clicked, send an OnNotify with the answer, and store it somewhere (per question).

To store the answers in the database, create a third table that holds the UserId, the QuestionId and the AnswerId.

Is this what you had in mind?

Thanks Kilian. 

Looks like that's what I was looking for, I will look into this.

Hi Harry,

If you have any additional questions, just let us know. In case my post above was sufficient, could you mark it as Solution, so that this thread shows up ad Solved? Thanks.

Hi Kilian,

I'm not getting it quite. Attached the OML. I created the tables (Q = Question, A = Answer, see the ERD) and tried to create the screen, but there I am stuck (also getting some warnings/errors). Could you give a tiny example?

Regards, Harry

Solution

Hi Harry,

Find attached a small example of what I had in mind.

Solution