====GET==== ===Parameters=== ^Order^Name^Type^Desc^ |1|name|[[const|const]]|The name of the variable to retrieve| ===Returns=== Any item stored with [[fSET]]. ===Description=== This command is used to retrieve a stack item that was saved with [[fSET]] or [[fPUT]] and place it on top of the stack. Using **GET**, [[fSET]] and [[fPUT]] can give significant performance improvements, as no repeated, expensive tasks (such as database searches etc.) need to be performed. When this command is used in the function passed to [[fEACH]], the search //cascades// - it will not only search for those items that were inside the [[fEACH]] function, but also inside //any// scope. This search is carried out in-order, so if you have conflicting variable names, the one 'closest' will be chosen. ===Example=== A simple example of [[fPUT]] and [[fGET]] being used. **'TE101' [[fASSET]] 'asset' [[fPUT]] 'Temperature' [[fPROPERTY]] [[fPOINTS]] 'asset' [[fGET]] 'Serial Number' [[fPROPERTY]] [[fPOINTS]] [[fAPPEND]]** //This is a simple example - there are much more efficient ways of doing this particular job!// In this example, we are looking for the temperature and the serial number of TE101 (and we are going about it the hard way). * First, we find asset TE101 ([[fASSET]]) * We save that asset as 'asset' so we can use it later. ([[fPUT]]) * We find the property called 'Temperature' ([[fPROPERTY]]) * We then locate every valid use of 'Temperature' on that asset. ([[fPOINTS]]) * We retrieve the 'asset' TE101 from memory. (**GET**) * We find the property called 'Serial Number' ([[fPROPERTY]]) * We then locate every valid use of 'Serial Number' on that asset. ([[fPOINTS]]) * We join both lists together. ([[fAPPEND]]) ===See Also=== [[fSET]] \\ [[fPUT]]