Hi Everyone,
I am working on a flow where people will submit their weekly project reports into a SharePoint list via a tab in Teams. Someone in the PMO will then be notified that a new report has been submitted and needs to be reviewed. If it is approved I then want it to be deleted from the SharePoint list and moved to a folder on another SharePoint site in a specific folder. I've got most of this working but I am having issues with one particular thing.
We organize these reports weekly and the folder name is based on the current Friday's date (i.e. this week's folder will be 20190315). What I am wanting to do is when a report is approved have the flow calculate what the next Friday's date is and move the approved report to that folder.
Can anyone help me with this? Is it even possible?
Thanks in advance.
Solved! Go to Solution.
Hi @Anonymous ,
Do you want to move an attachment stored in SharePoint list to another SharePoint site in a specific folder after approval?
Do you want the file to be uploaded to a folder with the name of next Friday’s date which is based on the current Friday’s date?
Please check the following flow for a reference.
To calculate what the next Friday’s date is, I have used three Compose actions.
By the way, the file is named as 20190315.xlsx,
In Compose, select the dynamic content DisplayName.
In Compose 2, input the following code to format the file name to a ISO format.
concat(take(outputs('Compose'),4),'-',take(skip(outputs('Compose'),4),2),'-',take(skip(outputs('Compose'),6),2))
In Compose 3, input the following code to add 7 days to the current Friday’s date:
addDays(outputs('Compose_2'),7,'yyyyMMdd')
In the action Create file, specify another site and configure the folder path as:
/Test1/Outputs(‘Compose_3’)
Then select display name and attachment content from the previous actions.
Best regards,
Mabel
Hi @Anonymous ,
Do you want to move an attachment stored in SharePoint list to another SharePoint site in a specific folder after approval?
Do you want the file to be uploaded to a folder with the name of next Friday’s date which is based on the current Friday’s date?
Please check the following flow for a reference.
To calculate what the next Friday’s date is, I have used three Compose actions.
By the way, the file is named as 20190315.xlsx,
In Compose, select the dynamic content DisplayName.
In Compose 2, input the following code to format the file name to a ISO format.
concat(take(outputs('Compose'),4),'-',take(skip(outputs('Compose'),4),2),'-',take(skip(outputs('Compose'),6),2))
In Compose 3, input the following code to add 7 days to the current Friday’s date:
addDays(outputs('Compose_2'),7,'yyyyMMdd')
In the action Create file, specify another site and configure the folder path as:
/Test1/Outputs(‘Compose_3’)
Then select display name and attachment content from the previous actions.
Best regards,
Mabel
Also if anyone needs to get the date of the next monday, tuesday, friday, saturday... etc. Then you can use this example flow to continually get the date of any upcoming day of the week https://powerusers.microsoft.com/t5/Power-Automate-Cookbook/Date-of-Next-Chosen-Day-of-Week/td-p/146...
User | Count |
---|---|
88 | |
39 | |
23 | |
20 | |
16 |
User | Count |
---|---|
128 | |
49 | |
47 | |
34 | |
25 |