Sep 06 2021 07:24 AM
Hello.
I have a question about Files Created dates and retention Policies.
If when i create my site y upload lots of files to a library at the same time, the file created date shows as the date the file was loaded - if there is a Retention policy applied that is to keep the file (for exmaple) 5 years, if i cannot modify the Created field on the library to show the correct date, how will the policy work correctly then?
is there a way to change the Created Date (without having to ad a new column for every library)
thank you
Sep 06 2021 08:54 AM
@MVC_User
Hi,
Is there a legal requirement to use the created date and not the modified date?
You may want to consider using tools that retain the original create/modify date.
Paul | SLIM Applications
Apr 19 2022 06:18 AM
Oct 13 2022 06:59 AM
@Kelvin Kirby
You can use the rest endpoint
api/web/getfilebyserverrelativeurl('<absolute path to document>')/listitemallfields/ValidateUpdateListItem()
to update fields like "created" and "created by"
This works great from Power Automate
Oct 14 2022 12:18 AM
How can I apply this for updating the Created with another date field, i.e. Fieldname Created - Field Value WFCreated - my flow like this runs successfully but the outputs have an error message "
Oct 14 2022 01:44 AM
Oct 14 2022 02:05 AM
Oct 14 2022 03:49 AM
@claire2020 Writing column name directly like this will not work. Try configuring your flow as given below:
Use body like:
{
"formValues": [
{
"FieldName": "Created",
"FieldValue": "@{formatDateTime(item()['WFCreated'], 'dd/MM/yyyy HH:MM')}"
}
],
"bNewDocumentUpdate": true
}
Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.
Oct 14 2022 05:07 AM
@ganeshsanap Thank you so much, I'm very new to working with flow and http requests, and that worked almost perfectly - it updates the 'created' date, but it's a day behind - here is the screenshot, so where WFCreated is 17th, it puts the created date as 16th? I'm guessing it's time zone related, but I'm not sure how to put this in the http body - thank you for your help
Oct 14 2022 06:15 AM
Oct 14 2022 06:19 AM
@claire2020 Try using convertToUtc or convertTimeZone function instead of "formatDateTime" function in body.
Please consider giving a Like if my post helped you in any way.
Oct 14 2022 06:20 AM
@ganeshsanap thank you, I have used that and it works, so thank you for all your help, very much appreciated
Oct 14 2022 06:35 AM
@claire2020 You're welcome, very glad it worked for you!
Please consider giving a Like if my post helped you in any way.
Oct 15 2022 01:11 AM
@claire2020
The Power Automate approach is one that works for you. Good to hear.
Another approach is to extract the create and modify dates from the files itself (not the OS). Most common file formats such as docx, xlsx, pptx, doc, xls, ppt, pdf, jpg, png, msg, eml, ... contain the create and modify date within the files.
For example,
If these values are extracted during uploading into a SharePoint column then this offers a better approach for applying retention labels based on the actual create/modify dates and not the OS dates.
Note: there are file formats such as zip, txt that do not have the capability.
Jan 22 2024 03:46 PM
Hello @claire2020,
Does it work with an item in SharePoint instead of a file?