does not seem there is a simple solution, you have to iterate through document.all collection and check each element's scopeName