Apr 26 2022 12:21 PM - edited Apr 26 2022 12:27 PM
Hello everyone,
Haven't been able to figure this out:
Scenario:
2 Sharepoint sites,
Site1 - DocumentLibrary1
(Site with no guest access for document uploads)
---
Site2 - DocumentLibrary2
(Site specifically for external guest access and viewing documents, basically a document portal)
I need to trigger the flow to copy files from Site1 to Site2 based on a status column, including nested folders.
In Site1, I have a choice column with status Shared/Not Shared which I use in my trigger condition.
Here is what I have so far:
I am stuck on the logic on how to move forward, how do I create the folder structure if it's not present and include it here?
Also I tested the flow in its current form and the trigger condition seems to not be working, the flow just hangs on the test, no error is given.
Any ideas or help are appreciated.
Thanks.
Apr 27 2022 08:44 PM
SolutionUpdate to this seeing as no one seems to know how to help:
As there might be someone looking for this in the future I'll include the solution here.
Good luck stranger, google is your friend!
I resolved it myself with the following flow structure:
take(triggerOutputs()?['body/{Path}'],sub(length(triggerOutputs()?['body/{Path}']),1))
join(skip(split(triggerOutputs()?['body/{Path}'],'/'),1),'/')
Then the copy file runs again and copies into the created folder.
The issue with my trigger condition was that I included spaces once I removed them it worked perfectly:
@equals(triggerBody()?['ExternalSharingDocuments']?['Value'],'Shared')
Finally, I will create a separate delete flow for any "Shared" documents deleted in the source library to delete them in the document portal.
Hope this helps someone.
Apr 27 2022 08:44 PM
SolutionUpdate to this seeing as no one seems to know how to help:
As there might be someone looking for this in the future I'll include the solution here.
Good luck stranger, google is your friend!
I resolved it myself with the following flow structure:
take(triggerOutputs()?['body/{Path}'],sub(length(triggerOutputs()?['body/{Path}']),1))
join(skip(split(triggerOutputs()?['body/{Path}'],'/'),1),'/')
Then the copy file runs again and copies into the created folder.
The issue with my trigger condition was that I included spaces once I removed them it worked perfectly:
@equals(triggerBody()?['ExternalSharingDocuments']?['Value'],'Shared')
Finally, I will create a separate delete flow for any "Shared" documents deleted in the source library to delete them in the document portal.
Hope this helps someone.