.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Post New Web Links

Calculate Ageing using Formula Column

Posted By:      Posted Date: October 25, 2010    Points: 0   Category :SharePoint


What I'm after is to create an ageing column that displays the number of days that a document has been in our library.  We've eliminated the whole calulated column thing because it's not dynamic. Where we've arrived now is to create a List View and are using SharePoint designer to create a calculated column. We get to the point where we open up the XPath expression builder an we're trying different syntax, but can't seem to get it figured out.  We have a column that exists called DateDumped that we just want to know the number of days since that date based on todays date. Any suggestion on the syntax or any other ideas would be greatle appreciated.

Thanks in advance.


View Complete Post

More Related Resource Links

Datetime column with [Computed column specification] formula

i have a datetime field in my SQL Server table i dont want to add weekend dates in this column. For this reason i always have to check the calendar. how can i use [Computed column specification] formula so that i never add weekend dates?

Caculated column formula for Workdays between two dates ? Excluding weekends? DateDiff

This gives me the number of days between two days.. great=DATEDIF([Completed],[Issued],"D")is there any way to exclude weekends?

formula validation setting on column sharepoint 2010

Hi, Hi,  I have a two fields(mailid,cost,mailid2), i need a list validation of mailIds if already existing  mails three time I need a validation for new request , i need a formula for column in validation setting ->formula in SP2010  if mail is already existing validation  i need formula for validation setting for list it's new feature in sharepoint 2010 Regards

Lookup column uses ID instead of Title in rule formula

I have two SP lists: Partner and Request. Partner just has a Partner Name column, plus the ID column. In Request, I have a lookup column pointing to the Partner list. There is also a Title column and a Request Date column. When I set up the lookup I set it to get info from the Partner list’s Partner Name column, not the ID column.   I made an InfoPath form to make a new Request, with the Partner being selected from a Drop-Down List Box. When this form is submitted, I would like to change the Title field to be a string concatenation of Partner Name, a comma, and the Request Date. I made a rule to do this. Example of what I want: “Partner A, 8/27/2010”.  However, the result is that the Partner ID is used instead of the Partner Name and what I get is “1, 8/27/2010”.   (More: In production I would use the Form Submit rule to do this. For development I used a rule that runs when the field changes. If I change the Drop-Down List Box properties Value property (on the data tab) from d:ID to d:Title the string is formatted as desired, but the form won’t submit and shows a tooltip that only positive integers are allowed.)   How can I make the rule use the Partner Name column in the formula for the rule, instead of the ID?   Thank you, James.

Caculated column formula for user name Compare

Hi , i  have a formula in sharepoint 2010 (form library->validation setting-> formula $ userdefine message)  example : =username =<"2" user messge  your request is already existing ,,, i have  1fields that user name but i need formula for is user already existing two time we did not allow  3 time i am using of validation setting and formula in sp2010 Regards Raju

Errors with calculated columns, the column posts, but doesn't calculate.



I have a custom list that isn't processing calculated columns anymore.

When I post a calculated column I get one of two error messages...either "SQL Server may not be started" or "The value does not fall within the expected range".  I've noticed the sql message before but the changes are made and calculations in the past have worked ok.  Now that the "value" error is cropping up it's quit calculating the columns.

i.e. I open a calculated column, simply have it reference a numeric field (=[MyNumberField]).  When I hit ok I get one of the two error messages.  When I look at the value of the calculated column it's blank.

Any references to articles, etc. would be helpful.  There are 406 columns in this list...

Best Regards,


Calculate Column Sum



Example i have following tabele named Sales:

ID             Number            price

1                  5                      5

2                  6                       10

3                  18                     15

4                  35                     20

I whant to display this data in report service like that determine  in wich  interval([1-15]  or [15-30]  or [30-60] ) must be number's value

How to display/calculate total of a custom column in dataview webpart's grouping header



I've created a dataview from a MOSS2007 form library. In the dataview, I've enabled grouping by a specific column and also was able to show the total (sum) of couple of columns like this, in the group heading:

<xsl:value-of select=”sum($nodeset/@Total_x0020_Cost)” />

So far, it's working fine. I've added couple more columns to this dataview. There's a piece of javascript code that is executed for each row. These 2 columns gets their value from this javascript. Now, is there anyway, I can get the total/sum of these columns in the group heading.

Have you done something like this? Please advise.




Today's date Sharepoint column formula

How do I access the today's date in a column formula in Sharpoint List.  The TODAY function doesn't work in calculated columns values.

How to calculate the total of wpf datagrid text column



I have WPF DataGrid that is bound to and entity.

The DataGrid has a "Difference" column that is computed from the difference between two other columns in the same DataGrid.

Now I have a TextBox outside the data grid that should contain Sum of all cells in the "Difference" column.

How do I do that?


<DataGrid AutoGenerateColumns="False" HorizontalAlignment="Stretch" Margin="5,35,150,40" Name="BoxCountDataGrid" VerticalAlignment="Stretch" ItemsSource="{Binding UpdateSourceTrigger=PropertyChanged, Path=DemersalBoxCounts}" >


                              <DataGridTextColumn.HeaderTemplate >
                    <TextBlock Text="Recorded Box Unit/Weight(kg)" Width="70" TextWrapping="Wrap"/>

              <DataGridTextColumn Binding="{Binding DEBC_BCT}" Width="*">
                <DataGridTextColumn.HeaderTemplate >
                    <TextBlock Text="Box Count" Width="70" TextWrapping="Wr

Workaround to using "Person or Group" field in a "Calculated" column formula?


Apparently, SharePoint does not allow you to insert a "Person or Group" column into a "Calculated" field's formula.

Is there a workaround to adding a "Person or Group" column into a "Calculated" field's formula?

-Maybe a way of coverting the data from the Person or Group column into a text field, and referencing that text field in the formula?

Microsoft mentions only Columns of the following data types can be referenced in a formula: single line of text, number, currency, date and time, choice, yes/no, and calculated.

SharePoint Calculated Column Formula or Using JavaScript/jQuery



I have one issue in creating a calculated column formula:

The idea is:

|	Column1			|	Column2			|	Column3			|
|	Name1			|	(empty)			|	Name1			|
|	(empty)			|	Name2			|	Name2 			|
|	Name3			|	(empty)			|	Name3			|

For example we have 2 columns (Column 1 and Column 2) that may have or may not have a value but at least one of them will have a value.

Column 3 is the calculated column that will check if Column 1 has value and Column 2 is empty(by default Column 2 will be empty because Column 1 has value :)) then the value in Column 3 will be the same value as Column 1. Otheriwse if Column 1 is empty and Column 2 has a value, the Column's 3 value will be the value from Column 2.

Can this be achieved with JavaScript or jQuery ? to fill the column's 3 value based on the other two columns if have or not value?


Declaring a foreign key to a column of 'formula' datatype

I have a primary key declared as 'Computed'. Trying to relate a foreign key to this column in the Database Diagram, it complains on data types being different. Declaring the Foreign key as nvarchar or varchar did not help. When declaring it as 'Computed', column was not available for selection as a foreign key. Any advice?
Baruch Barness

Tooltip for GridView Column Headers (ASP.Net)

I just wanted to add auto tooltips for my GridView headers. There are couple of ways but I don't want to use javascript and wanted to use simple 'title' attribute. It took couple of hours to get the working code supporting sortable columns. I thought it will be very useful for others. Here's the code and logic behind it.

Multiple Column Dropdownlist for the ASP.NET DataGrid

Based on my previous control "Multiple Column DropDownList for ASP.NET", I received many emails asking for the same control to be used in the DataGrid for web applications. Here we go.. This control can be used as the regular MS DropDownList in the DataGrid and also as a regular dropdownlist. It has all the properties, like DataTextField, DataValueField, DataSource, SelectedIndex etc. The download file contains the samples both in VB.NET and C#. In this sample, I have used the Northwind database of SQL Server.

Calculate distance, bearing and more between Latitude/Longitude points

This page presents a variety of calculations for latitude/longitude points, with the formulæ and code fragments for implementing them.

All these formulæ are for calculations on the basis of a spherical earth (ignoring ellipsoidal effects) - which is accurate enough* for most purposes. [In fact, the earth is very slightly ellipsoidal; using a spherical model gives errors typically up to 0.3% - see notes for further details].

How to calculate the distance between two points on the Earth

We offer many Global Database Products that you can use with the below formulas to calculate distances and many other uses. Not sure how to use distance calculations or global databases within your company? See our Global Database Examples for more information on how to use our data within your industry. Be sure to Download a Free Sample of one of our many Global Database Products.
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend