Frequently Asked Questions
Frequently Asked Questions
How can I get the date when the document was created in M-Files?
Posted by Hannu Anttila (M-Files) on 19 September 2018 11:43 AM

You will need some scripting to get the date when the document was created in M-Files.

  • Make a new property of data type "Date"
  • In property definition, open "Automatic Values"
  • Calculated value (VBScript)" add the following script:

Option Explicit

DIM dateValue
dateValue = PropertyValues.SearchForProperty( 1495).TypedValue.DisplayValue

if (dateValue ="" ) then
Output = Now
end if

NOTE: you can't use "Customized automatic numbering (VBScript)", because it does not allow to use data type "Date".Change the value 1495 in the example to the ID of your new property

  • Change the value 1495 in the example to the ID of your new property
  • Place the property in the class you want to use

Script saves the M-Files saving time in that property, if the property does not have any value.

(2 vote(s))
This article was helpful
This article was not helpful

Help Desk Software by Kayako case