There is no method of doing this with out altering the item and or data becuase hashtables dont store information insertion/update dates
I would suggest if this is an important feature to what ever yuur doing you swap to using a hidden window, some sample code below
alias -l hidden.window.name {
var %window = @ACTUAL.WINDOW.NAME.HERE
window -h %window
return %window
}
alias hw_name { return $hidden.window.name }
alias hw_add {
;$1 = item name
;$2-= data
if ($0) {
if ($fline($hw_name,$1 *,1) || $fline($hw_name,$1,1)) { dline $hw_name $v1 }
aline $hidden.window.name $1 $2-
}
}
alias hw_del {
;$1 = item name
if ($0) && ($fline($hw_name ,$1 *,1) || $fline($hw_name ,$1,1)) { dline $hw_name $v1 }
}
}
alias hw_get {
;$1 = item name
if ($0) && ($fline($hw_name ,$1 *,1) || $fline($hw_name ,$1,1)) { return $gettok($line($hw_name,$v1),2-,32) }
}
u can use
/hw_add itemname itemdata
/hw_del itemname
$hw_get(itemname)
$line($hw_name,0)
items in table$line($hw_name,N)
item N in table using inserted/updated order this line is wrong see correction belowFor more exact or wild card searches you could create extra aliases or just access the hidden window yourself using $hw_name instead of the actual windowname (this way the window well always exist)
--correction--
$gettok($line($hw_name,N),1,32)
itemname N in table using inserted/updated order$gettok($line($hw_name,N),2-,32)
itemdata N in table using inserted/updated order