Multiple record form - how to validate across records

I have a multi record form and I want to validate the data like this:
row 1 - “A”, “yes”
row 2 - “B”, “no”
row 3 - “C”, "no
row 4 - “D”, no

Validation should be something like if “A” is “yes”, then “D” should also be “yes” otherwise dont allow saving.

I was looking to do this in an OnValidate event.

Hi
try using global variable or parameters, checking the value of the fields

if ({field1}==‘A’ and {field2}==‘yes’){
[saving]=‘yes’;
}
if ([saving] and {field1}==‘D’ and {field2}==‘no’){
[saving2]=‘yes’;
}
else{
[saving2]=‘no’;
}

Then in onbeforeXXXXX check saving2 variable to allow saving data or not.

May be it’s simpler but I never did it.

regards.

Thanks for the suggestion - I have used global variables to try and account for this, but I thought there must be a way to validate by looping through the data - I just dont know how that would be done.