Hi Guys
I want to make my Control Number or Household twice for surety or security.
i.e 1. control number in the beginning is 500023, then at the of the questionnaire they should enter the same, if they don't it should show "error message"
Thabiso
Double entry
Re: Double entry
Add a second control number field to your dictionary and drop it onto the form at the end of the questionnaire. Then in the postproc of the second control number field compare the two values and call errmsg if they are not the same:
Code: Select all
if CONTROL_NUMBER <> CONTROL_NUMBER_CHECK then
errmsg("Control numbers do not match");
endif;
-
- Posts: 1796
- Joined: December 5th, 2011, 11:27 pm
- Location: Washington, DC
Re: Double entry
You will likely want to reenter the field after displaying the error message, so the complete logic may look like this:
PROC CONTROL_NUMBER_CHECK
if CONTROL_NUMBER <> CONTROL_NUMBER_CHECK then
errmsg("Control numbers do not match");
reenter;
endif;
if CONTROL_NUMBER <> CONTROL_NUMBER_CHECK then
errmsg("Control numbers do not match");
reenter;
endif;