Variable number of questions

Variable number of questions

Hello everybody,
This would be a great help for our project. If anyone can help us on this, it would go a long to make my outsystems project a big success. I wanted to use a table record widget and populate it with a variable number of questions(one question per row on the table). Next, I pulled three radio button widgets into one of the columns on the table. So on the webscreen, a user will see whatever number of rows with a question and 3 radio buttons in each row. The major issue do I record the user's selection of each of the radio buttons per question in the table when I press a "Save" button on the screen. I could create a radio button variable for each row, but I don't know how many rows I will have. I can limit the table rows to ten questions and have ten variables and save the ten variables in the database and reset the table to show the next set of ten questions. But the complications of tracking ten variables and inserting each of the variables into a table would make this task difficult. Is there an easier solution? Attached is the webscreen I am designing with the questions and radio buttons.
Thanks in advance.
P.S. I tried to attach a screen shot to this post, but the forum times out. So please contact me with an email address and I will email you directly with a screen shot.
Hi Frank,

You could try to add a invisible field in each row and then add to the radiobuttons of the same row one onClick event via javascript to set the invisible field value with the selected option.

The code for each line should be inserted in one expression box with something like this for the radio buttons:
<input type="radio" onclick="document.getElementById('""').val('1');" >
<input type="radio" onclick="document.getElementById('""').val('2');" >
<input type="radio" onclick="document.getElementById('""').val('3');" >

And then have one TextBox (binded to the record) per line with the name 'InvisibleInputField'
This might be the way to go.  Does anyone else want to chime in with their opinions?
Hi Frank,

Why don't you create an attribute for that value in the "question" record? Let's call it RadioButtonResult for example.
This way, you will have N variables (as many as your table records rows) for your radio buttons.

When putting the radio buttons on the screen, assign it to the TableRecords.list.Current.YourRecord.RadioButtonResultAttribute.

On the Save action if you iterate through TableRecords.List the value will be correctly stored in the "RadioButtonResultAttribute" attribute.