Items in SystemWeaver are versioned. When new versions are created, they are typically saved in the same location as the previous version, but an option is provided to select a different library. Items can also be moved to a different library. This article provides examples for how to find if an item has versions located in different libraries. 

Viewing Library Information for One Item

This option works well if you are only interested in seeing if one particular item has versions in different libraries.

Versions View

  1. Select the item in the structure that you are investigating. 
  2. Load the Versions view
  3. To add the Home Library information as a column on-the-fly, right-click on the header row in the view, and select Export > Add field column
  4. Enter HomeLibrary

The column will display the Home Library for each version of the selected item. The column can be moved to any position in the view. 

The grid can be exported to Excel as described in Customizing Grid Views.

Searching Across Libraries

If you are interested in finding all items in the database whose versions are not all in the same library, you can do an XML search. 

Warning: This is a heavy operation if the database is large, e.g., 10 GB+, and it will block other users from working while the search is running.

Searching Across All Libraries

  1. Go to Open item > General Search.
  2. In the Find items dialog, navigate to the XML tab.
  3. Enter the following filter:
    <Filter><Satisfies test="x:=HomeLibrary.Handle; AllVersions[HomeLibrary.Handle != x]"/></Filter>

    By default, this will return the latest version (including latest version of any branches) of items that have versions in different libraries. 

    If you want to return all versions, you can uncheck Include only the last version. You can even add the Home Library information as described above. 

Searching for Versions Not in Specific Library

You can also complete an XML search for versions that are not in one particular library. In other words, you want to confirm that all items in library “Test” have all their versions located in that same library. The search will return all versions that are not in library "Test". To perform the search, you first need to obtain the library's xid. You will find this in the Manage Libraries view when selecting the library. 

Follow the same steps as outlined above for Searching Across All Libraries, except include the xid of the library in the filter. 

<Filter><Satisfies test="HomeLibrary.Handle='x130000000009F693' and AllVersions[HomeLibrary.Handle != 'x130000000009F693 ']"/></Filter>