Problems with SEEK AND SELECT ERROR MSG FUNCTIONS!! Urgent
Posted: August 10th, 2015, 1:45 pm
Attached is the survey am working on.
I have a household roster with Household IDs and Age. In my case HHold ID is s1q1_idno and age is s1q4a. I have another record type where I have a question s7aq3 which asks for a random ID Number to be inserted from the roster provided the age corresponding to that ID is more than 18 years.
For any IDNUM you may put in s7aq3, the program should be able to check that the age corresponding to that ID from the Household roster is more than 18 years.
I used seek function as follows :
Numeric householdloanid = seek(s1q4a(s1q1_idno));
If householdloanid<18 then
Errmsg(…..);
Endif;
This did not work. Can anyone help me.
In another separate development, I am seeking for another help on select error function. It worked for me when I used fewer variables. However, when I attempted to use larger list of variables as shown in the coding below, it wouldn’t compile.
calculatedTotal = S3BQ3+S3BQ4+S3BQ5+S3BQ6+S3BQ7+S3BQ8+S3BQ9+S3BQ10+S3BQ11+S3BQ12;
If S3BQ14 <> calculatedTotal THEN
errmsg(8,calculatedTotal,S3BQ14)
Select("Change Sch. & registration fee, Q3",S3BQ3, "Change PTA Contibutions, Q4",S3BQ4,
"Change Uniform & Sports Expenses,Q5",S3BQ5,"Change Text Books Costs, Q6",S3BQ6,"Change Sch. Supplies,Q7",S3BQ7, "Change Transport cost, Q8", S3BQ8,"Change Lunch & Pocket money Cost, Q9",S3BQ9,"Change Examination Fees, Q10",S3BQ10, "Change Extra Classes cost, Q11",S3BQ11,"Change Other Expenses, Q12", S3BQ12, "Change Transport cost, Q8", S3BQ8,"Change Lunch & Pocket money Cost, Q9",S3BQ9,"Change Examination Fees, Q10",S3BQ10, "Change Extra Classes cost, Q11",S3BQ11,"Change Other Expenses, Q12", S3BQ12);
endif;
I have a household roster with Household IDs and Age. In my case HHold ID is s1q1_idno and age is s1q4a. I have another record type where I have a question s7aq3 which asks for a random ID Number to be inserted from the roster provided the age corresponding to that ID is more than 18 years.
For any IDNUM you may put in s7aq3, the program should be able to check that the age corresponding to that ID from the Household roster is more than 18 years.
I used seek function as follows :
Numeric householdloanid = seek(s1q4a(s1q1_idno));
If householdloanid<18 then
Errmsg(…..);
Endif;
This did not work. Can anyone help me.
In another separate development, I am seeking for another help on select error function. It worked for me when I used fewer variables. However, when I attempted to use larger list of variables as shown in the coding below, it wouldn’t compile.
calculatedTotal = S3BQ3+S3BQ4+S3BQ5+S3BQ6+S3BQ7+S3BQ8+S3BQ9+S3BQ10+S3BQ11+S3BQ12;
If S3BQ14 <> calculatedTotal THEN
errmsg(8,calculatedTotal,S3BQ14)
Select("Change Sch. & registration fee, Q3",S3BQ3, "Change PTA Contibutions, Q4",S3BQ4,
"Change Uniform & Sports Expenses,Q5",S3BQ5,"Change Text Books Costs, Q6",S3BQ6,"Change Sch. Supplies,Q7",S3BQ7, "Change Transport cost, Q8", S3BQ8,"Change Lunch & Pocket money Cost, Q9",S3BQ9,"Change Examination Fees, Q10",S3BQ10, "Change Extra Classes cost, Q11",S3BQ11,"Change Other Expenses, Q12", S3BQ12, "Change Transport cost, Q8", S3BQ8,"Change Lunch & Pocket money Cost, Q9",S3BQ9,"Change Examination Fees, Q10",S3BQ10, "Change Extra Classes cost, Q11",S3BQ11,"Change Other Expenses, Q12", S3BQ12);
endif;