Logo 
Search:

Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Now() in a list Column

  Asked By: Deborah    Date: Aug 01    Category: Sharepoint    Views: 1630

We are trying to autogenerate a default Request Number in an issue list. The
column gets populated by an EventHandler for a Service Request Form library.
The colum is text and the InfoPath Form generates the Reqest Number as a
concatination of yyyy-mm-ddThhmmss. If someone clicks on New Item on the
issue list, the Request Number column is blank. I have managed to get the
default to be "ManualEntry-yyyy-mm-ddT00" by using the calculation
=CONCATENATE("ManualEntry-",YEAR(Today),"-",MONTH(Today),"-",DAY(Today),"T",HOUR\
(Today),MINUTE(Today))

Does anyone know of a way to get the hhmmss? I tried HOUR(now),MINUTE(NOW)
but get a syntax error.

Share: 

 

5 Answers Found

 
Answer #1    Answered By: Lesley Tate     Answered On: Aug 01

Try this:
=CONCATENATE("ManualEntry-",YEAR(RightNow),"-",MONTH(RightNow),"-",DAY(Right
Now),"T",HOUR(RightNow),MINUTE(RightNow)) where RightNow is another field of
DateTime set to default  to today.

BTW I could not get the keyword TODAY to work in any of the positions.
SharePoint 2003 says that it can't use volatile types, whatever that means.

 
Answer #2    Answered By: Vinay Thakur     Answered On: Aug 01

I created a text  field called calToday and made it equal to [Today] and then
created a dataTime field called Tdoay and made it equal to calToday.

The RightNow field doesn't work. I get an error  that says the calculation
contains a field.

 
Answer #3    Answered By: Lynn Mann     Answered On: Aug 01

TODAY and ME are volatile types. In WSS v2 you could use them if you
temporarily created a column  called "Today" filled with your test dates.
When you subsequently deleted your Today column, the existing formulas
would use the volatile types as you would have hoped they would do
without the workaround.

 
Answer #4    Answered By: Damini Dande     Answered On: Aug 01

When I created the RightNow field, I chose DateTime type rather than Text
and set the radio button option to default  to Today's date. I then referred
to that field in the calculation, using the dropdown list  of fields offered,
and it worked OK. Or as the guys at work say "It works fine on the Dev LAN".

 
Answer #5    Answered By: Irving Hurley     Answered On: Aug 01

Your solution works if I make the Request Number a Calculated column  and use:
=CONCATENATE("Request-",YEAR(Created),"-",MONTH(Created),"-",DAY(Created),"T",HO\
UR(Created),MINUTE(Created),SECOND(Created))

However, the Request Number column is a Text column that gets populated  from an
InfoPath Form via an EventHandler. The field on the InfoPath Form is generated
based on the time the Request is Submitted. If the Request Number on the Work
Order list  is a calculated column then the Request Number on the list will not
match the Request Number on the InfoPath Form and that is the one the
EventHnadler uses when it sends an acknowledgement email to the submitter.

If the support personnel want to manually enter a Work Order they will have to
manually enter the entire Request Number themselves.

 
Didn't find what you were looking for? Find more on Now() in a list Column Or get search suggestion and latest updates.




Tagged: