NoDups-c Filter: IF COUNTER = 1 TRUE SET Test-t TO "~«RepeatVar1»«RepeatVar2»~" ELSE IF Test-t CONTAINS "~«RepeatVar1»«RepeatVar2»~" FALSE ELSE TRUE SET Test-t TO Test-t + "«RepeatVar1»«RepeatVar2»~" END IF Usage: "" REPEAT Dialog FILTER NoDups-c FORMAT "a, b and c" RESULT + "«RepeatVar1» «RepeatVar2»" END REPEAT
This computation is a filter for suppressing duplicate entries in a repeated dialog. It works by creating one long string composed of all values it has already processed separated with a tilde "~" (to prevent cross-matches, like Bob Kermit to Kermit the Frog). Values are compared against this string. If there is a match, the value is a duplicate and will be suppressed. If there isn't a match, the value is allowed to pass and will be appended to the string.
The example above is filtering on two variables, RepeatVar1 and RepeatVar2. You may filter on as few or as many variables as you would like. You don't need to filter on every variable in the dialog.
The filter requires only one temporary variable, Test-t (set the Advanced options to "Ask only in dialog," "Don't warn if unanswered," and "Don't save in answer file").