table.UNMARK_DUPS Function

Syntax

V Unmark_Dups(C Dup_Key_Expression,C Filter_Expression)

Arguments

Dup_Key_Expression

Optional. Default = .T. (all records). A character filter expression that evaluates to a logical value. Selects the records that will be checked for duplicates.

Filter_Expression

Character

Description

Unmarks the duplicate records in the table.

Discussion

The <TBL>.UNMARK_DUPS() method is a high-level utility method you use to unmark duplicate records in a table. The operation is performed on the records in the table pointed to by the object pointer, <TBL>. A Duplicate_Key_Expression is a field or a combination of fields that Alpha Anywhere uses to determine which records in the table are considered duplicates. For example, if you consider a record with the same values in the Firstname, Lastname and Address1 fields to be a duplicate, the Duplicate_Key_Expression would be: Firstname + Lastname + Address1. In order to unmark a subset of duplicate records, you can add a Filter to the script. Only records that satisfy the filter are checked for duplicates. If no Filter is specified, then all records are checked for duplicates, regardless of any query that might currently be applied to <TBL>. Note : If you are unmarking records in a set with one-many child links off the parent table in which you are unmarking records, remember that if referential integrity is enabled, unmarking a parent record will result in all matching child records being unmarked as well.

Example 

This script unmarks all records in the current table that have the same PROD_ID field.

tbl = table.current()
tbl.unmark_dups("PROD_ID")

This script unmarks all records with PRICE > 100 in the current table that have the same PROD_ID field.

tbl = table.current()
tbl.unmark_dups("PROD_ID", "PRICE > 100")

See Also