Skip to main content

We have an editable list view which retrieves a list of questions from a SQL table, and allows users to submit an answer via radio button selection to each question.

the questions are displayed depending on what drop down control has been selected.

 

we need to make sure that all questions have been answered on each row before we can submit the form

 

what is the best way to validate this?

Cheers

There are a couple of ways you could handle this.

 

1.  In the list item changed event, you could use a validation condition on the edit row to make sure all required fields have a value before you apply changes.  This would force them to enter required fields on each row.

 

2.Add a hidden data label to the list view and make the type numeric.  Put an expression on the data label body to see if your edit row field of interest contains a value. Return 1 if it does and 0 if it does not.  Use a Sum aggregate on the column to sum up the hidden data label values.  Add a count aggregation on another column.  Before you submit if the sum does not equal the count, then the user missed one.


Reply