Hello! I need help with a script with looping to evaluate and mark records. I have four fields: Name_Global, NameA, NameB and Tag. I want to have a result in a field: Tag that is true when either NameA or NameB is a match with Name_Global, but not when that same condition is in the following record(s).
The first record does not need to be evaluated.
Scenario: If the match is true for NameA, for example, in records 1 through 5, then no true result is needed. Records 6 through 10 is a match for NameB, so then record 6 Tag is true, but not records 7 to 10. Carrying on, records 11 through 15 is again a match with NameA so the Tag for record 11 is true, but not the remaining records 12 through 15.
So, in other words, every time the match shows up in the OTHER field in the next record, then the tag is true. The first record that is a match in either NameA to NameB, gets a Tag a true, but not the following ones.
I'm not sure if it matters or not, but please note that when a record is a match for, say, NameA, then NameB will have all kinds of other names that are not to be considered. The only name that needs to be used for evaluating is the one that is entered in Name_Global.
If anyone could write a script for this, I would very much appreciate it. It seems my sense of logic is fading with age???