Radio Buttons

I have a list of users and, for each item of that list, I would like to associate four radio buttons that represents the tdiferent ype of users. The objective is to assign an unique type for each user. Putting the radio buttons it's not a problem because I use expressions to build them. The real problem is in getting the values from the radio buttons to save in the DB.
An alternative is to use a drop down list but the problem is the same: how to get the values?
Radio button functionality can be easily reproduced with the Select widget (drop down).

1- The correct way to do that is to use an auxiliary entity with usertypes.
Then you can use a Select widget with Source Entity property set to that entity to show these options. A variable must be bound to this widget and can be used to set(in preparation) / retrieve (in screen actions) the selected value.

2- Even if you don't want to create an entity you can always use the Select widget Special List property to insert hard coded values. In the screen actions you can then access the SpecialListValue runtime value.

You can see examples of Select widget usage in several sample oml's in Documents\Samples.
For more information please refer to
Service Studio Help/Web User Interface/Gathering Data/Web Select Widget
But the Service Studio doesn't allow me to drag and drop a select widget into a list records.
Sorry. I did not understand that we were talking about a List Records widget.
Input widgets inside List Records widget will be supported in the next version of OutSystems Hub Edition that will be available next month.
Until then you should use buttons or links.

If the list of options is dynamic then you'll probably need an edit button inside the List Records and then edit a single record in a different page (or in the same page). But this way you can only edit one record at a time.

If it is a static list then you can place different Buttons inside If widgets inside the List Records. You can then access the List Records current record in the screen action.

Hope this helps.
Just to let know that Radio buttons and Input widgets inside Table List Records widgets are now supported in OutSystems Hub Edition 2.2.
For more information see What's new in OutSystems Hub Edition 2.2
Hi everyone!

In my application I have to make a non static single choice matrix. My choice for doing it was html because I can't  figure out a way of doing that using record's lists (list append only insert lines, not rows). 
The problem now is to save the selected choices and insert them in the data base. 

Thanks for your time!
Hi Janete,

Could you share some screenshots of what you're trying to accomplish, so we can try to give you some more ideas?


Paulo Tavares

Here is a pic of what I pretend, it's not well formatted but for now that isn't important. 

Those numbers (49, 50, 51...) are the values of wich radio button, it's the id of a table that combines the two pairs (statement option and scale option). 
The ideia is to submit the selected values when the Next button is pressed. 
I'm not sure I get your question, but let me try it.

If the list is dynamic, you may generate it by creating:

- A web block with a List Records with no line separator, that renders each line;
- A main screen with a List Records that renders that web block in each line, with the right values.

Afterwards you may iterate through the List Records' widget List in order to retrieve those values and store it in the database.

Does this help - and is this clear?


Paulo Tavares
I've written rows instead of columns in my first post, my mistake.
The matrix will have m columns and n rows and those values are only known during runtime.
The rows are not the problem, so is there a way to add columns for each scale option the matrix has?
As I mentioned, the best way I can think of doing it is to try using a web block with a List Records with no line separator. This web block will render the number of columns in each line.

I'm sure there might be other - and probably simpler - alternatives.


Paulo Tavares
I can't find a better way to do it, and this works. 

Thanks once agian.
I am also having some issues with Radio Buttons.
I want to create a Questionnaire. I was able to create the Questionnaire with radio buttons using List Records.
But how to get the selected choice, how to group the radio buttons (I created a variable and assign that variable to radio buton. Then only one choice can make for all three questions). 

Hi Tekla,

Given that you have 3 radio groups you will need 3 different variables.