SharePoint List Column Today's Date - sharepoint

All,
Does anyone know how to make a column in a SharePoint list that will always display today's date when rendered? I've seen tricks that require the list/item to be modified each day however, that's not what I'm looking for. I just want a column that whenever the list is viewed it displays the current date.
Thanks for any feedback.

I wanted to say that you use calculated columnns, but unfortunately according to this link the TODAY function is supported as a default value, but not supported in a calculated column.
So, outside of a default value, the only way to do this may be through a more involved effort. I see two options:
Use SharePoint Designer and the Data Form Web Part to show a view into a list with an additional column that has today's date.
The right way to do this is likely a computed field as it does not involve storing any additional information, but simply displays additional information. I didn't find a good link that only discussed computed fields, but this link does go into a bit of depth.

Related

Saved Search criteria/results seem to have a different naming scheme from everything else

I'm trying to find a resource or explanation for how to determine how a field will display in the criteria or results dropdown of a saved search. For instance, in the results I would like to see the PO# field (fieldId:otherrefnum). But when looking through the drop down, I see neither of these as options. This has been a serious source of frustration for me with many other fields, I'd like to find a definitive way to avoid wasting time on this in the future.
Thank you!
There are a number of contributing factors to this.
The field names you see on forms may have been re-labeled by form customizations
Netsuite normalizes transaction searches to which leads to some (IMO) odd column name re-use.
A lot of old fields or fields tied to functionality (e.g. transaction status fields) don't follow the regular pattern of numeric id and text name.
The records browser helps quite a bit. You can search here and see that otherrefnum is named 'PO/Check Number' in the search editor. (An example of field name normalizing referred to above)
If you look at transaction you'll see it is just search filters and columns. If you compare to Sales Order you'll see something perhaps more familiar in terms of fields.
Even armed with the records browser experience is still needed. e.g.
A sales order has an items sublist and one of its fields is itemtype. In order to get that value in a search you need to select Item fields and then choose Type. A Sales Order's items.description column becomes the line level memo field in search results.
Hope this helps

problems with excel showing producs when insterting measurments with multiple results

Hello i'm having problems with getting this to work. What i'm trying to do is when you insert a set of measurements i want excel to show the ( In this case products) which are closest to those measurements.
here is a picture:
The result i'm trying to reach is when you type in the measurements you get product(s) and the manufacturer which are closest to those measurements.
Any help is greatly appreciated.
In essence, what you are after is an index+match function. It will allow you to find a value in one list, given a corresponding variable. In this case, given a measurement, it will find a manufacturer and product combo in your list.
Your problem is that you will need to adapt your data to allow for this. For example, you need to decide whether you only want the closest match for measurements or if you need the closest match that is greater than the measurement you provide.
It is also possible that you'll need to split your measurement column into two different columns (unless all you need is the total area irrespective of individual lengths).
You could potentially avoid the index+match by using conditional formatting, but that would still require the data manipulation.
Given the information you provided, the answer will never be much more informative than this. But this should get you started and the following steps can be made easier with help from google.

Sharepoint Lookup

I have been absolutely stymied by Sharepoint lookups and the complete lack of information anywhere that relates to my problem so one last stab at seeing if anyone has a clue if not I am going to find another job which doesnt involve the use of this very good but highly complicated system.
My problem is that I want to add a column in list 1 that looks up a column in list 2, all very easy you may think and the nice videos on you tube make it seem very easy. So imagine the frustration when I create the column choose the appropriate list from "get information from" drop down and then go to the "in this column" drop down to find the fields i want are missing. I have tried this many ways and could not resolve it. So I decided to start again and set up a brand new list 2 which contains just 4 columns each created manually one column is "just single line of text" called Financial year the other three are a "number" and called Population, Dwellings and Non Domestic. Now having done that I would expect to see thos 4 columns (Financial year, Population, Dwellings and Non Domestic) all appear in the "in this column" drop down when setting up the lookup. But no of course not bloody Sharepoint will only show: Title, Financial year, ID , Content Type, version, and Title (linked to item) none of which I am the slightest bit interested in. I want to look up Population, or Dwellings or Non Domestic. Why is this so easy to do in Excel but in Sharepoint it seems as if Bill Gates has decided he's in charge of what people lookup!! in a word its crap.
I should have added that the same happens whatever list I select to look up from.

Calculated formula for sharepoint list to return "expired"

The formula I am using is:
=IF((DATEDIF(Todaycalc,[TERMINATION DATE],"d"))<0,"Expired","")
but while it calculates for the NO, I am getting a #NUM error for the part I want to return as "expired". the calculated field is set to text.
I'm not sure what the TodayCalc item in your DATEDIF function is. If this is a column then it needs to be inside brackets [Todaycalc]. If you are trying to use the TODAY formula to return the current date, you cannot use this (or ME) in Calculated Columns.
There is a trick to getting this to "work" where you use a column named Today, use it in the formula then delete it. But it is a silly trick since it still only calculates when an item is created/modified. You might as well use the Modified column.
As #thisChrisKent has said you can't use the [Today] trick without some serious workarounds - it just doesn't work as you would expect it too.
You've a couple of options for doing this sort of dynamic view.
Convert the List View Web Part (LVWP) to a Data View Web Part (DVWP) and add formatting via SharePoint designer and/or XSLT/JavaScript
Add javascript in a Content Editor Web Part to apply the formatting - Christophe is a great source for this sort of stuff which you could adapt for your needs.
3rd party products and custom calcualted columns - such as Highlighter, Follow-Up, Corus Works and others
(disclaimer - first link is from my own company)

Any solution to the Today Calculated Column problem is SharePoint?

I would like to be able to use today's date in a calculated column in a SharePoint list to, for example, determine whether a task is overdue. There is a well-documented trick that involves creating a dummy column named "Today," using it in a formula, and then deleting it, thereby "tricking" SharePoint into using the Today function.
The problem is that this method does not work reliably -- the calculation is not dynamic; it is only made when the item is saved, and therefore the Today "column" effectively becomes the Modified Date. (This is probably why SharePoint won't let you use the Today function in a straight-forward way.)
Has anyone found a solution that works? I know I can use javascript to get the actual date on the client side and display colors, flags, whatever, but I am looking for a "server side" solution.
For reference, the Today column trick and its problems are described fairly well at these two posts and associated comments:
http://blogs.msdn.com/cjohnson/archive/2006/03/16/552314.aspx and http://pathtosharepoint.wordpress.com/2008/08/14/calculated-columns-the-useless-today-trick/
There simply isn't a work around for this. As the values for the list are stored in the database and returned "as is" to other featurs such as the search crawler, a dynamic field cannot be created.
It is possible to create a custom field that will display the value using todays date in its calculation.
In addition to Christophe's (PathToSharePoint)'s article this also covers the Today trick and why it doesn't work
The Truth about using Today in calculated columns
There are a number of fudges, probably the best one is Dessie's console app (mentioned above by MNM)
Dynamically updating a SharePoint calculated column containing a Today reference
Its good but its not perfect, for example you may have to worry about different timezones.
Before going down this route you should ask yourself if you really, really need to do this. For example :-
If you want a countdown (days overdue/days left to complete a task) then you can use SPD and a XLST Data View web part
If you want a view to show overdue items or items created in the last X days ec then you can use [Today] in a views filter 2
If you create a Today column it needs to be updated. You can do that with either a timer job or by placing a jquery script on a page that is hit by the user. The script could call SPServices.SPUpdateMultipleListItems to do the update. Pass a CAML clause so that you only update the list items where the Today value needs to be updated, e.g. once per day.
My advice is to create your on field that does this calculation for you and then reference it in your SharePoint list. Not a simple implementation but it would work.
I have been looking for a solution either, still no luck.. The Today column trick has the limitation of not being dynamic.
I do have one suggestion though, why don't we create a timer job that will update a certain a certain column with the current date every day at 12 AM. I know some of you all might think it an over head. Just my suggestion :D!!
I came up with a very rough, but working solution to this problem without having to do any coding. I'll explain both how i made the today column and how i worked that in to an overdue column, becuase that column was a pain to find out how to do as well.
First, I made a column named "today" (gasp!). Next I made a column named "Days Overdue". I then opened up sharepoint designer and created a new workflow. I set it to run every time an item is edited/updated (keep in mind I turned off versioning for this list, otherwise I would have had to resort to coding to avoid a bunch of useless data building up on our server). I set the actions to simply store the modified date in a workflow variable, then change the value of the today column to that variable. although the modified column is a date/time and my today column is just a date, it transfers just fine. I then set the workflow to pause for 2 hours. you can set this to whatever amount of time you want obviously, it will just change the latest possible time for your today column to update, i.e. 2AM in my case.
on to the days overdue column. this is the code for that guy -
=IF([Due Date]>Today,"None",IF([Date Closed]=0,Today-[Due Date],IF([Due Date]>[Date Closed],"None",IF(Today>=[Date Closed],[Date Closed]-[Due Date],IF([Due Date]<Today,Today-[Due Date])))))
This shows the days overdue in number form in days, or if its not overdue, it shows "None". You can use either a number format or a string format, but NOT A DATE FORMAT. Well, I hope this helps anyone who is running into this problem and doesn't want to have to delve into coding.
EDIT: I forgot to say that in the code above for the days overdue column, I put in that if today is past the date closed, to use the date closed minus the due date instead of today minus due date, to ensure that the calculation doesnt keep occurring after an item has been closed. you probably would have noticed that in the code, but i felt i should point it out just in case.
EDIT 2: The code I had in before my 2nd edit for my calculated column didn't calculate the days overdue properly after an issue had been marked "closed." I put in the updated code. The last part of the code doesn't make sense, as it is the same logic as the beginning, but it worked so I didn't want to take any chances! :)
Peace.
I've used the following and had no problems.
Field Name: Overdue
Field Type: Calculated
Data Type Returned: Yes/No
Formula:
=AND([Due Date]<NOW(),Status<>"Completed",[Due Date]<>"")
Here is a workaround:
Create a date column called Today.
Use this column in your calculated formula (ignore the fact that the formula returns a wrong value).
After you are done with the formula, delete the Today column from your list.
For some reason it works this way! Now Sharepoint treats the Today in your formula as today's date.
Note: If you decide you want to change the formula, you have to create the Today column again. Otherwise, it wouldn't recognize Today as a valid column.
I Tried #Farzad's approach and it seems to be working perfectly. I wanted to do a custom count on Days Elapsed so added a calculated column which previously I was using a difference between the Created Date and Modified Date Columns, which was only showing up whenever a user updated the post, much to my dismay.
I now have a formula which works as I would want to and uses the Today column, and here it is for anyone who would like to use it. I also have a Status column on the basis of which a base of On Hold is used, and the remaining formula are based on the date difference of Today - Created.
=IF(Status="On Hold","On Hold",IF(AND(Today=Created,(DATEDIF(Created,Today,"D")=0)),"New",IF(AND(Today<>Created,(DATEDIF(Created,Today,"D")=0)),"New (updated)",IF(DATEDIF(Created,Today,"d")>3,"Need Update Immediately",IF(DATEDIF(Created,Today,"d")=1,"One day old",IF(DATEDIF(Created,Today,"d")=2,"Two days old",""))))))
Basically its just a bunch of nested IF conditions which get me labels on the basis of which I can add a group to my view and filter out data if needed. Hope this helps anyone looking for an answer!

Resources