Takes a variable number of parameters, FieldBase, Test1, Test2, [etc...]
Note: Unlike most other statements in MOX, because of the dynamic number of other items you must specify a blank FieldBase when it is not needed and they are not otherwise set by the WorkWith command.
All Records in the Query that have any of the Test values evaluate to True (not blank) will be kept, all others will be discared. Each Test may be a Field name or a literal. When a Field name is used, placing the operator Not with a space in front the Field name will reverse the logic on that item, such that it will be True if blank.
In the below example a record is kept if it isn't a relay or if it is a relay and we have a team match. This allows for more complicated boolean logic operations on the work query.
'Declare our fields
NewFields "IsRelayRace IsTeamMatch IsRelayRaceAndIsTeamMatch"
'Set if it is a relay race
SetIf "IsRelayRace", "`y", "Comp.Class.FullName", "_=_", "`Relay Race"
'Set if we have a team match
SetIf "IsTeamMatch", "`y", "Comp.Participant.Role", =, "Comp.HorseUse.Role"
'Set if it is a relay and we have a team match
SetIfAll "", "IsRelayRaceAndIsTeamMatch", "`y", "IsRelayRace", "IsTeamMatch"
KeepIfAny "", "Not IsRelayRace", "IsRelayRaceAndIsTeamMatch"