Find an Answer
has_history() — Returns a boolean result that indicates whether or not a node contains history information.
The has_history() function returns a boolean expression, and takes one parameter:
boolean /#has_history(tree input)
The has_history() function produces a boolean result.
The has_history() function produces a boolean result to the yes-or-no question of whether or not a node contains history information. The has_history() function can take any number of parameters.
You can try the following examples against your own data in the GoToAssist search field, or against fictitious data in the Query Sandbox:
Query: Do the in_octet nodes have history data?
SELECT /#has_history FROM /network/device/interface/in_octets
Results: Depending on the database, this query returns results similar to this:
SELECT /#has_history FROM /network/device/interface/in_octets
Results: Depending on the database, this query returns results similar to this:
row has_history() false row has_history() false row has_history() true row has_history() true row has_history() false . . .
Query: Which software has been installed since January 1st, and does it contain history?
SELECT name, /#has_history FROM /network/device/wmi/win32_product WHERE installdate > '20080101'
Results: Depending on the database, this query returns results similar to this:
row name Adobe Acrobat 8 Professional has_history() true row name Skype\x99 3.6 has_history() false row name Windows Defender has_history() true . . .
Query: Do the systems with low disk space have history information?
SELECT /#has_history(systemname) FROM %free disk space% WHERE freespace < 1000000000 AND description = 'Local Fixed Disk'
Results: Depending on the database, this query returns results similar to this:
row has_history(systemname) true row has_history(systemname) false row has_history(systemname) false
To see other PQL functions, see Functions.
Related topics