I have the result in a return separated list (it came from ExecuteSQL) something like this:
I also have another list
What is a way FileMaker can say if any of the values in List 1 exit List 2 evaluate as true? I was trying to use FilterValues ( ) Inside of PatternCount () but it went sour and I forgot the whole plan.
not IsEmpty ( FilterValues ( ~list1 ; ~list2 ) )
It returns True (1) if the intersection of the two lists is non-empty (if there are any shared values between the two lists). Note that this calculation will evaluate faster if you put the list you expect to be shorter as the first parameter to the FilterValues function.
Here's a frist broad brush stroke.
The calculation variables could be turned into script variables and you could change the calculation result to return the actual number instead of just true (1) or false (0).
This calculation could easily be run in a loop.
By incrementing the counter variable each time, you would be testing the next value in the search list until a match is found.
If you go this route, be sure to have the right exit loop statements.
The idea would be to parse the value list (VL) with the search list (SL) for matches.
Let ( [
// Value List
// Search List
SL = "DOC000000095¶LNK000000080¶LNK000000081" ;
// Determine the number of searches required.
VC = ValueCount ( SL ) ;
// Start the counter at 1 and increment.
Counter = 1 ;
// Search Term
ST = MiddleValues ( SL ; Counter ; 1 ) ] ;
PatternCount ( VL ; ST ) )