I noticed that vars.schema returns the targeting dimension name on Javascript Code, but I would like to know if it is possible to find out which is the Filtering Dimension on Javascript Code. Thank you!
Crude approach is to search the workflow's xml, looking for query transition target = your activity, then retrieve [query/where/@filteringSchema] from it.
This can be done in 1 line using E4X filtering, doc here: