0
votes

I am new to SharePoint and trying to explore Content Types, Lists, libraries; I created my own Content Type called "Salary Report" (Parent - Document) and assigned to my "Salary Report Library". "Salary Report" content type have only two columns - Date Created and Document (and also hidden Title).

I would like to handle document creation and use Date Created column to store Salary Report Month value by calculating this in code. Are there any options to handle document creation in code (C#/.NET or JavaScript) or how can I handle this?

Thanks!

1

1 Answers

1
votes

You could use Microsoft Flow to achieve this.

Step1:

enter image description here

Step2:get current month utcNow('MM')

You could know more about this here: https://www.o365dude.com/2017/05/01/working-with-dates-times-in-microsoft-flow/ enter image description here

Step3:get current file ID enter image description here

Step4:call a rest api update column value you want. enter image description here

‘date’ is the ordinary column, ’DateCreatedByme’ is the column in content type.