To emulate document permissions based on metadata, I'm trying to create my own document routing logic through a workflow retrieving the value from a metadata column and moving the file to the appropriate folder. It works fine except for the fact that I'm using a hierarchical term set for my metadata so I need the folder system to be two levels deep. Therefore I need to retrieve the full path for the metadata term. But I haven't found a way to do it!
If I have a document tagged Economics:Reports I need it to be moved to the Reports folder inside of the Economics folder, but I can only retrieve the term name "Reports". I've tried using the "TaxonomyHiddenList" and the Rest API, but I guess I'm too ignorant to understand how to do it.
Can anyone please help me out or guide me if there is another way to solve it?