ENDGRID_ERRORS

Using ENDGRID_ERRORS on a page, enforces questionnaire logic and backend checks on the same screen. The error will appear in the same location as your griderror when the respondent tries to submit. You can also assign levels to endgrid errors, to enforce logic sequentially, rather than trigger every error simultaneously once the page is submitted.

The ENDGRID_ERROR must be inside of the grid/endgrid statements after all of the questions are asked and you can have as many as needed.  If triggered, a respondent or interviewer cannot move off of the screen until the specified question is answered properly.  These can be programmed alone or used in conjunction with javascript functions, depending on the type of question and backend checks required.  A label is recommended but not required.

EXAMPLE:

{ GRIDLABEL:
!GRID }

QUESTIONS...

{ ENDGRIDERROR1:
Display text to the respondent or interviewer showing what needs to be fixed before being able to move off of the screen.
!ENDGRID_ERROR }

{!ENDGRID }

Customizable Errors on ENDGRID_ERRORS

There are two methods to control the presentation of these messages.

You can show all errors at once or only show one at a time.

The default is to show all at once using the {!SHOW_ALL_ENGRID_ERRORS} statement and it can be turned off with {!-SHOW_ALL_ENDGRID_ERRORS} which would show only one error at a time.

You can also set a level on the !ENDGRID_ERROR command. This will allow you to present errors in a specific order or to show specific groups of errors together. The error with the lowest level will be shown first, the error with next highest level would be shown next. Any errors without a level assigned would be shown last.

{ GRID2:
!GRID }

{ Q2A: 
Q2A Question text 
!FIELD
1 ONE
2 TWO
3 THREE }

{!IF Q2A(<>1)
This is the Endgrid Error for Q2A. Q2A is not a 1. 
!ENDGRID_ERROR LEVEL=2 }

{ Q2B:
Q2B Question text
!FIELD
1 ONE
2 TWO
3 THREE }

{!IF Q2B(<>1)
This is the Endgrid Error for Q2B. Q2B is not a 1.
!ENDGRID_ERROR LEVEL=2 }

{ Q2C:
Q2C Question text
!FIELD
1 ONE
2 TWO
3 THREE }

{!IF Q2C(<>1)
This is the Endgrid Error for Q2C. Q2C is not a 1.
!ENDGRID_ERROR LEVEL=1 }

{!ENDGRID }

In the example above, if there were three errors on the page, the error for Q2C would be shown first. Once that was corrected the errors for Q2A and Q2B would be shown.