Enabling history of an Asset



Wanted to enable history of an asset, So that I can get the details of the user to whom it was assigned earlier, presently to whom it is assigned.


Kindly let me know what need to be done.

  • This can be done e.g. using the application designer.

    At field or link level on the scripts tab set the "Keep History = Yes".

    Also at table level there is the possibility to do retail the 'Last Modifier'. To add this link to all or selected tables; see the menu bar for 'Database'.


    It is also possible to do archiving if needed: for this see the Administration Guide Chapter 9.

  • Hi,


    Thanks for the response.


    In amPortfolio table-- for Asset tag field -- if I make Keep History as Yes , will it track the users to whom it is assigned presently , to whom it was assigned earlier.



  • Keeping history on AssetTag will generate a history record everytime that element value changes.  The history record will record previous value, new value, and the end user (ie. Author) that caused the history to be captured.


    If you want to know which user is assigned an asset and when that user changes then keep history on User link (ie. lUserId).  This will create a history record everytime the assigned to user is modified just as above.

  • Hi,


    After making the said changes in the DB i can see the history being captured.


    But from the AM tool when I try to see the data in Histort tab I get the below error.


    [Thrd#:5788](-2006) ODBC error: [Microsoft][ODBC SQL Server Driver][SQL Server]The text, ntext, and image data types cannot be compared or sorted, except when using IS NULL or LIKE operator. SQLSTate: 37000
    2013/07/24 12:32:27.603 2 1 [Thrd#:5788](-2006) SQL statement 'SELECT TOP 201 H1.lHistoryId, H1.Field, H1.dtLastModif, H1.PreviousVal, H1.memPreviousCmt FROM amHistory H1 WHERE H1.lHistObjId = 38434 AND H1.HistObjTable = N'amComputer' AND CASE IsNull(N'User',N' ') WHEN N' ' THEN IsNull(H1.Field,N' ') ELSE N'User' END = IsNull(H1.Field,N' ') AND CASE 0 WHEN 0 THEN H1.lAuthorId ELSE 0 END = H1.lAuthorId AND CASE IsNull(convert(datetime, '20130723 12:32:10', 112),convert(datetime, '19000101', 112)) WHEN convert(datetime, '19000101', 112) THEN DateAdd(day, -1, H1.dtLastModif) ELSE convert(datetime, '20130723 12:32:10', 112) END <= H1.dtLastModif AND CASE IsNull(convert(datetime, '20130724 12:32:13', 112),convert(datetime, '19000101', 112)) WHEN convert(datetime, '19000101', 112) THEN DateAdd(day, 1, H1.dtLastModif) ELSE convert(datetime, '20130724 12:32:13', 112) END >= H1.dtLastModif ORDER BY 5' could not be executed


    [Thrd#:5788](-2006) Unable to access table 'History (amHistory)'.

  • Make sure the end user security has access to the amHistory table.