Absent Member.
Absent Member.
530 views

AM 9.32 : Email Notifcation "Need previous Value details"

Jump to solution

Hi Experts,

 

We have AM9.32 in our environment. We have a requirement that is whenever Memory Value changes in amComputer table a notification has to be sent to Asset Manager.

 

Here we have a challenge for example : We have a configuration mail body as " The memory of the device "XYZ" has changed & the new value is [lMemorySizeMb]" but i need the previous value in the body text where am not able to refer it from amhistory.

 

Kindly someone please help me on this with the logic.

 

Regards,

Shrini

 

0 Likes
1 Solution

Accepted Solutions
Fleet Admiral Fleet Admiral
Fleet Admiral

Dim PreviousValue as String

 

PreviousValue = amDBGetString("SELECT a.PreviousVal FROM amHistory a WHERE a.lHistObjId =  " & [lComputerId] & " AND a.Field = 'lMemorySizeMb' AND a.dtLastModif = (SELECT MAX(c.dtLastModif) FROM amHistory c WHERE c.lHistObjId = " & [lComputerId] & " AND c.Field = 'lMemorySizeMb')")

 

Above will get you the most current history record.

View solution in original post

3 Replies
Fleet Admiral Fleet Admiral
Fleet Admiral

Use a script action instead of messaging action with same context and code logic for amActionMail() (see programmer's reference pdf guide under Docs folder where software installed).

 

0 Likes
Fleet Admiral Fleet Admiral
Fleet Admiral

Dim PreviousValue as String

 

PreviousValue = amDBGetString("SELECT a.PreviousVal FROM amHistory a WHERE a.lHistObjId =  " & [lComputerId] & " AND a.Field = 'lMemorySizeMb' AND a.dtLastModif = (SELECT MAX(c.dtLastModif) FROM amHistory c WHERE c.lHistObjId = " & [lComputerId] & " AND c.Field = 'lMemorySizeMb')")

 

Above will get you the most current history record.

View solution in original post

Absent Member.
Absent Member.

Thanks Mark, It worked

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.