Enhanced assign based on code from Richie Cotton http://4dpiecharts.com/2012/01/06/adding-metadata-to-variables/