Solved

How to get the name of the folder that a document resides in?

  • 9 November 2020
  • 2 replies
  • 218 views

Badge +6

Hi, I have a workflow on a document library that sends to a panel of approvers based on what folder the document is in.  I therefore need to determine the folder name for the switch.

Any ideas how to do that?

 

I'm thinking a variable set to absolute encoded URL and some kind of substring function but can't work it out.  Thank you!

icon

Best answer by Brice235i 10 November 2020, 08:00

View original

2 replies

Userlevel 3
Badge +9
I use a department field in the form that is used in the workflow to lookup who the approvers are. Then over time, new departments can be created and old ones removed. Plus the approvers for each department change over time too. No changes required in the form or workflow. Just update the Department-Approver table.
Badge +6

Thank you, that is a good idea.


 


The folders are created automatically via doc set creation and each folder  has a different approver route.... and then this is different depending on the 'Asset/Department' which I'm setting as a variable to determine the approver groups.  Really looking forward to getting this workflow finished... is also in Spanish language which is interesting.


 


I ended up using regular expression (extract)  - [^/]+(?=/[^/]*$)  


 


Thanks again!

Reply