Portal Engine Questions on portal engine and web parts.
Version 4.x > Portal Engine > Make current date as default value in a datetime field of a document type View modes: 
User avatar
Member
Member
seanbun - 11/16/2009 11:16:44 PM
   
Make current date as default value in a datetime field of a document type
Hi,

I created a datetime field in a document type. Is there any way I can make the current date as a default value. I tried with a custom marco by it did not work.

Cheers,
Matt

User avatar
Kentico Consulting
Kentico Consulting
kentico_borisp - 11/17/2009 8:06:54 AM
   
RE:Make current date as default value in a datetime field of a document type
Hello,

Could you please describe your requirement further? Do you want allways to have the date in the described field the current date, or you want that the date in that field is allways the date when the document created?

Best regards,
Boris Pocatko

User avatar
Member
Member
seanbun - 11/17/2009 5:12:05 PM
   
RE:Make current date as default value in a datetime field of a document type
Hi Boris,

I want the date in that field is allways the date when the document created.

Cheers,
Matt

User avatar
Member
Member
Piernik - 11/18/2009 3:23:43 AM
   
RE:Make current date as default value in a datetime field of a document type
Hi.

You need to put ##TODAY## in "Attribute default value:" field.

P.

User avatar
Member
Member
seanbun - 11/18/2009 5:11:51 PM
   
RE:Make current date as default value in a datetime field of a document type
Thanks Piernik,

It works very well. What are the possible values? Is there any documentation about this? or this is just a custom marco without parenthesis?

Cheers,
Matt

User avatar
Member
Member
Piernik - 11/19/2009 4:21:40 AM
   
RE:Make current date as default value in a datetime field of a document type
I don't know what are other possible values :) - I found this in one of default document type (don't really remember which one). I didn't find any documentation about it either...

Best regards,
Piernik

User avatar
Member
Member
seanbun - 11/24/2009 11:08:49 PM
   
RE:Make current date as default value in a datetime field of a document type
Martin has provided more details about this. Please read the comment on this post - http://bit.ly/8LmYzi