Utilization of the Log Database in ShipWeight

<< Click to Display Table of Contents >>

Navigation:  Administration and Customization > Database Administration >

Utilization of the Log Database in ShipWeight

Administration and Customization > Database Administration

Enabling the Log Function

The ShipWeight log function can be used to restore changed or deleted weight information in ShipWeight.  The log function must be enabled for changes and deletions to be logged.  Enabling of the log is done in the “Database” tab sheet of the “Options” window (menu: Project->Options…) as shown here:



Note that the “Data File Import” window in ShipWeight has its own setting option for logging import that can be used to overrule the settings in the Options window.  This is done to make it convenient to skip logging for large data import.  Logging the import will make the import take twice the time of the same import without logging, so in case logging is not needed you may consider to not use it during import, especially for large files.  This is where you will find the log setting in the “Data File Import” window:



Checking and Restoring a Changed Item from the Log

In ShipWeight’s Item Window you may right click any item and select “Item History from the submenu.


This will bring up a window showing all previous revisions of the selected item.  You will see the date and time, and changer, of the item.  One row represents one revision of an item.  To recover a previous revision of an item, mark the line you want to recover and click the “Recover” button, followed by the “Close” button.


Restoring a Deleted Item

To restore a deleted item, right click anywhere in the table view of the Item Window and select “Deleted Items..” (not “Delete Item(s)) from the submenu.


This will bring up a window showing all deleted items, screened by the same filter that is applied to the Item Window you are running this function from.  This means that if you have the Item Window open for a particular weight group, the Deleted Items window will show deleted items for this weight group only.  If you have another filter applied in the Item Window, in example related to a maximum weight or CG position, this will also be applied when showing the deleted items, and so on.



To restore a deleted item, mark the item or items in the Deleted Items Window, rightclick and select “Restore” from the submenu.

Restoring from the Project Log Database Window

If you want to restore multiple items from a potential mix of changed and deleted items, this can be done from the Project Log Database window. You open this window from the menu “Database->Administrator->Project Log Database…”

After this window opens, make sure that you navigate and select the “ITEM” table as shown below.  To restore items, mark the items you want to restore, right-click and select “Restore” from the submenu.


This window also has input boxes for “Filter” and “Sort”.  Sorting can also be done by clicking the column header of the quantity you want to sort on. Clicking once will sort ascending, while clicking one more time will sort descending.  If you want to type in the sort syntax in the sort input box, the syntax is [<Qnt>] DESC/ASC and sorting on more than one column is done by separating the sort commands by comma.  In example:  [Description] ASC, [LCG] DESC  will sort first on the description column, then descending on the LCG column.

If you want to use the “Filter” input box, standard SQL filter syntax should be applied, in example “[Description] Like ‘Unit%’” or “[Weight] < 100”.

Note that if you scroll to the end of the table, you will find a column named “Changes”.  This column will tell you if a row was the first insert of the item (“Insert”), an update of an existing item (“Update”) or an item that has been deleted (“Delete”).  See picture below.