REM "input validation for field Q1, makes sure fields Q1-Q8 each have a value and that the value is unique (assumes these are text values, e.g., combobox fields)"; _ratings := Q1 : Q2 : Q3 : Q4 : Q5 : Q6 : Q7 : Q8; REM "In Notes 6 you can generalize this using @DocFields and @Forall"; @If(@ratings = ""; "You must rate each question."; @Elements(@Trim(@Unique (Ratings))) != @Elements( @Trim(Ratings)); "You must use each rating only once." )
This was first published in July 2003