xref:markForDelete
Syntax
xref:markForDelete(mapName, elementName, elementValue)
Description
Use the xref:markForDelete function to delete a value in a cross-reference map when the element specified is the only element for a single domain. The value in the element is marked as deleted. If multiple domains reference the element or the domain the element is referenced by has multiple primary elements, use the xref:markForDeleteNVP function instead.
A cross-reference map row should have at least two mappings. Therefore, if you have only two mappings in a row and you mark one value for delete, then the value in another element is also deleted.
Any element value marked for delete is treated as if the value does not exist. Therefore, you can populate the same element with the xref:populateXRefRow function in ADD mode. However, if the element value is marked for delete as a reference, it cannot be used in the LINK mode of xref:populateXRefRow function.
Parameters
| Parameter | Description |
|---|---|
|
mapName |
The cross-reference map name, as string. |
|
elementName |
The name of the element from which you want to delete a value, as string. |
|
elementValue |
The value to be deleted, as string. |
Returns
This function returns true if deletion was successful; otherwise, it returns false.
An exception can occur for the following reasons:
-
The cross-reference map with the given name is not found.
-
The specified element name is not found.
-
The specified element name is not unique to a domain.
-
The specified value is empty.
-
The specified value is not found in the element.
-
Multiple values are found.
Example
The following code deletes the PS001 value in the PS element of the customers cross-reference map:
xref:markForDelete("customers","PS","PS001")