On 06/07/2008, at 3:51 am, Chuck Pelto wrote:

I need to know what items in two different ValueLists (VLs) match and what items there are in each that do not have an EXACT match in the other.



Set Variable [$list1; ValueListItems(Get(FileName); "Value List 1")]
Set Variable [$list2; ValueListItems(Get(FileName); "Value List 2")]

# Find values that match
Set Variable [$intersection; FilterValues($list1; $list2)]

# Find values unique to Value List 1
Set Variable [$unique1; ""]
Set Variable [$i; ValueCount($list1)]
Loop
  Set Variable [$testval; GetValue($list1, $i)]
  If [FilterValues($list2; $testval) = ""]
    Set Variable [$unique1; $testval & "ΒΆ" & $unique1]
  End If
  Exit Loop If [$i = 1]
  Set Variable [$i; $i - 1]
End Loop

( ... repeat for list 2 ... )

PS. Chuck, you'll need to also check for blank lists.

--
Tim Mansour <[EMAIL PROTECTED]>
Neologica Print & Promotions (ABN 63 904 335 408)
159 Commonwealth Street  Surry Hills NSW 2010
Sydney 02 9212 1789  Melbourne 03 9012 7441  Mobile 0405 500 846

Reply via email to