Deleting a Cross Reference Table Value

You can use the xref:markForDelete function to delete a value in a cross reference table. The row, containing the column value passed to the function, is deleted from the XREF_DATA table and moved to the XREF_DELETED_DATA table. This function returns true if the deletion is successful. Otherwise, it returns false.

A cross reference table row should have at least two mappings. If you have only two mappings in a row and you mark one value for deletion, then the value in another column is also deleted.

The syntax for the xref:markForDelete function is shown in the following example:

xref:markForDelete(xrefTableName as string, xrefColumnName as string,
xrefValueToDelete as string) return as boolean

Parameters

  • xrefTableName: The cross reference table name.

  • xrefColumnName: The name of the column that contains the value to be deleted.

  • xrefValueToDelete: The value to be deleted.

Exception Reasons

An exception can occur for the following reasons:

  • The cross reference table with the given name is not found.

  • The specified column name is not found.

  • The specified value is empty.

  • The specified value is not found in the column.

  • Multiple values are found.