I'd go with based functions. Here are my ideas:
This should do. Unless you are referencing webscreens...
The GetEntryEspaceName function is a built-in function that returns the name of the eSpace that is processing the current Web request.
This function is only available within the expression editor.
EDIT: ups, too late...