Well, anything can be done through a custom macro, which can reference the Kentico API which you can retrieve any piece of information you need.
The trick is can you find a relationship between the current form or document. Usually when you are on a editing form, if you right click and look at the IFrame (open frame in new window) you'll see the URL parameters that are passed to the form. If you can take that data and use the API, you should be able to do what you need to!
Sadly i can't follow what exactly you're trying to do, otherwise i could try to give some more guidance.
https://docs.kentico.com/k10/macro-expressions/extending-the-macro-engine/registering-custom-macro-methods
https://docs.kentico.com/api10/configuration/workflows