The ‘value’ field contains code which is evaluated inside a function (using php eval() function). Thus the scope of variables is not the one from your view (the global scope).
I have been in the case where I needed a constant so I was using ‘define’ and could access it. But I have not been in the case where I need external variables, maybe by looking at the comments here you will find something. Try looking at $GLOBALS as well…