Forum Discussion
Move files based on user department
Hi All,
I really need some help. I am trying to design a solution where our team create a document from a template in a read only library, the flow basically creates a new document and copies the "File Content" to the new document and places it in a drop off library. This is all initiated by clicking a button which is in a column next to each template (I have all of this part sorted).
From there the flow updates the file properties to include the users surname in the title of the new document.
Now is the part that I am stuck on, I want the flow to then move the new document to a department library based on the users "Department" from their Office 365 profile. I have tried using the content organiser but it won't initiate organising on the created files and I know there used to be a SPD workflow action "Submit to repository" but this seems to be missing now.
Does anyone have any idea on how I can achieve this?
Hi JustinR
Based on your scenario (assuming I understand it right), I would save the new document to the users Department library FIRST and then add in the file attributes, etc once it's been created there.
It sounds to me that the drop-off library is purely a transactional place that you don't really need if you just generate the file in the desired location up front.
Before you create the new file, use Get user profile (V2) to get the users account attributes (use their email as UPN) and then the Department attribute could be used as part of the location path.
Hope that makes sense?
If I've misunderstood anything, please let me know and I can revise the suggestion above.
Cheers and best wishes
Damien
- Damien_RosarioSilver Contributor
Hi JustinR
Based on your scenario (assuming I understand it right), I would save the new document to the users Department library FIRST and then add in the file attributes, etc once it's been created there.
It sounds to me that the drop-off library is purely a transactional place that you don't really need if you just generate the file in the desired location up front.
Before you create the new file, use Get user profile (V2) to get the users account attributes (use their email as UPN) and then the Department attribute could be used as part of the location path.
Hope that makes sense?
If I've misunderstood anything, please let me know and I can revise the suggestion above.
Cheers and best wishes
Damien