In SystemWeaver it is rare that you would ever delete an item since items are never copies but originals that you usually spend some time in defining. Instead, you may want to remove an instance of the item, that is a part that is defined by the item. Of course, there can be cases where an item was created by mistake and you do want to permanently delete the item. Once an item, or any object in SystemWeaver, is deleted, it is permanent and there are no references to it once deleted. This article describes the available options:
- Open Item Page (items and parts)
- Versions View (items and parts)
- Structure Tree View (items and parts)
- Parts View (parts)
There are some conditions that must be fulfilled for an item to be deleted:
- You must have "Change" rights to the item. This condition can be checked in the Libraries view, and the Manage libraries page.
- The item must not be referenced, as a part in some item, or from an issue. You can check if an item is used as a part in the References view. In the view, you can then navigate to the item that owns the part, to remove the part. You can check if there are issues defined for the item by using the Issues view. In the Issues view, you can select the referencing item and remove the link.
- There must not be a later version of the item. This condition can be checked in the Versions view (which is also the view where you can actually delete the last version of an item, as described below)
If any of the above criteria are not met, you will get an error message when trying to delete the item.
Deleting From the Open Item Page
The Open Item page is one of the few places where you can actually permanently delete an item.
- Click the Open Item button to search for the item(s) you want to delete.
- In the Items list, select the item(s) to delete and click Delect item(s) in the Action menu to the left. (Alternatively, you can select the item and hit Enter.)
- In the "Do you want to permanently delete these items?" confirmation dialog, click Delete Items. The item is permanently deleted. The delete method is performed in the SystemWeaver server, which resolves any internal references between the items to be deleted and performs the delete in an optimum order so that referential integrity is maintained.
Deleting from Versions View
In the Versions view, you can only delete the latest version of an item, i.e., there are no newer versions of the selected item.
- Right-click on the latest version and select Delete version:
- The Delete items dialog will display. Click Delete items to permanently delete the item.
Deleting From the Structure Tree View
When deleting an item or items from the structure tree, you are actually deleting the part first and then the item (if it is not used as a part anywhere else).
- In the view, select the item(s) you want to delete.
- Right-click and select Remove Part(s). (Alternatively, you can select the item(s) and hit Enter.)
- For a single item, a Confirm dialog will display. To confirm that you want to delete the part, click Yes.
For multiple items, the Batch operation dialog will display. Click OK to remove the parts.
- If a single part was deleted, you will receive a second Confirm dialog regarding the fact that the item is no longer referenced.
For multiple parts, the Delete Items dialog will display instead.
This allows you to permanently delete item(s) that are not used anywhere else after you have removed the part(s). The purpose of this is to avoid "orphan" items. Prior to deleting an item(s), you should make sure that you or someone else does not want the item(s) for other purposes. To confirm that you want to permanently delete the item(s), click Yes or Delete Items. As mentioned in the Prerequisites in this article, If there are any references or issues linked to the item(s), you will get a "Cannot remove object" or "Items could not be deleted" message. To investigate any references further, look in the References view and/or the Issues view.
To exit without deleting the item, click No, the window Closebutton , or the Esc key.
Deleting Parts Using the Parts View
Aside from removing, and then subsequently, deleting parts from the structure tree, you can also use the Parts view to remove, and delete, parts. The following criteria must be met:
- You must have "Write" rights to the item that owns the part.
- The item that owns the part must be in "Work" status.
- Select the parent item of the part that you want to delete.
- In the Parts view, right-click on the part to delete and select Remove Part(s).
- Confirm removal of the part with OK.
As with the other delete options described, if you remove a single part, and the item that defines the part is not used anywhere else, you will be asked if you want to delete that item. This option is offered for convenience, to avoid remaining "orphan" items, but you should make sure that you or someone else does not want the item(s) for other purposes before deleting it.
Viewing a List of Delete Operations
With the release of R32, you an IT administrator has the option to configure a Statistics Log which will provide some basic information about delete operations. See Working with the Statistics Log for more information. To view an object that has been deleted, you would need to refer to a backup copy of the database.