Hi,
I'm on a vacation right now and don't have access to the editor, so I'm unable to check the spell.
You can do this with the key:
Custom script : set udg_integerVariable = GetHandleId(udg_unitVariable)
Then you can use the integer variable as a key in the hashtable line.