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

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

Calculated Fields and Lists.. do tell!

Posted By:      Posted Date: September 01, 2010    Points: 0   Category :SharePoint
Ok, so I have a massive Excel Spreadsheet with some lookups and calculated fields.  I need to port this over to a SharePoint list.   I'm guessing for something like this the Import Spreadsheet function won't cut it.. and that I have to rebuild the spreadsheet essentially from scratch and start from there. Is this the case? Once I create the columns as I want them, can I still port over the information (data) in the spreadsheet or am I essentially pooched when it comes to porting that data over?    Thanks!   J

View Complete Post

More Related Resource Links

Calculated Date Fields

I'm trying to calculate whether a delivery is on time or late and by how many days. Is there a way to format the column so it show's the result in the number format as opposed to showing up as a date? Negative numbers don't export into excel well.

Cross list query for two sharepoint lists and a join between the fields

Hello All, I have a requirement where i need to query the data from two  sharepoint lists  on a same site by doing a join between those lists and get the result into datatable.I am doing this using sharepoint object model.Is there any possibility to do this. Any pointers in the right direction are greatly appreciated. Thank you Smith   smith

Types of calculated fields in a query

Hello, I have a question about how the SQL server engine determines the types of calculated fields. For simple calculations I assume it's based on the types of the fields composing the query as they are defined in their tables, but what about a calculated field in this form, for example: isnull(field-name,-99)? Is there a way I can change the engine's selection in the query? Thanks.

Types of calculated fields in a query

Hello, I have a question about how the SQL server engine determines the types of calculated fields. For simple calculations I assume it's based on the types of the fields composing the query as they are defined in their tables, but what about a calculated field in this form, for example: isnull(field-name,-99)? Is there a way I can change the engine's selection in the query? Thanks.

How to sum up InfoPath calculated fields

I have a repeating table with calculated fields on each row.  At the end, I need to sum up all these calculated fields into total.  Which total is also a calculated field to sum up 2 calculated fields in the repeating table.  The total never show anything after data entry.  How can I sum up total from the calculated fields?  For example: QTY 1 of a Computer would cost $1000.  In the repeating row, I will allow customer to fill in multiple rows.  A field named line item total is a calculated field named EXTCOST which is set to QTY X Computer = $1000.  At the bottom of the form, I would like to sum up EXTCOST to get the Grand Total Cost.  The Grand Total Cost is fomat as SUM(EXTCOST) which is zero at all time. Please advise. Brian.

Sharepoint calculated fields?


Hi all,


I have a quick question for you in relation to sharepoint calculated fields.


I am trying to set up a method in calculated fields, using the task list

to enter in the status (not started, In progress, Completed, Deferred, Waiting on someone else)


Basically when the user selects t

Adding Calculated fields to a databound control


I need a form that displays three columns drawn directly from a database (no problems here) as well as two fields that require some complex calculations.  Not only am I lost as to how to incorporate the calculations into the control, I don't know exactly how to write the calculations. I am working in Visual Web Developer 2008 with Vb.NET.

The first of the two fields should take the sum of all payments made by a given customer and divide it by a DailyMembershipRate, returning a DaysPaid variable. It should take this variable and a CustomerSince field for that particular customer and calculate a PaidThrough field.

The second of the two columns similarly requires the DaysPaid variable described above. It should subtract the CustomerSince field from the current date and return the value in days, giving a MembershipDays variable. Finally, it should subtract MembershipDays from the DaysPaid variable, again returning a value in days, and then multiply this by the DailyRate value for a Credit/Deficit field.

I realize this is a lot, but I haven't been able to find any documentation either online or in VWD or ASP.NET texts on this topic. I could really use some fellow user input. I would really appreciate any help or general direction you're willing to offer. Thanks a

fx Controls instead of Drop Down Lists for Lookup fields in InfoPath Secondary Data Connections


I have a secondary data connection with a lookup field into another list. To display the fields text value instead of the index, I am using a drop down list which gets its choices from the linked list. This information is read-only so I disabled the control via formatting rule.

A calculated value control might be better suited, but my XPath skills are not very "developed". Has anyone done this before? Taken the index from the bound field and extracted the text value from a second data connection? Thx


Content Type or Lists Lookup Column can't show additional fields which are Choice or lookup columns


I am trying to create some content types, but this also happens when creating new columns in a list.

Ok, here is my setup (which is the most basic way to replicate the issue):

List 1: Department List
Columns: Department Name (Single Line of Text)

List 2: Document Owners
Columns: Document Owner (single line of text), Department (Choice or Lookup from Department List), Email (single line of text), Lookup Field (Calculated).

Content Type: Quality Document
Columns: File Name, Title, Document Owners (Lookup from Document Owners List), Email (pulled in with Document Owner), Then i want to also pull in Department from the Document Owners list.

That is where my problem is.  When i select the Document Owners List as the list to get the information from, there isn't the option under "Add a column to show each of these additional fields" to pull in the Department column.  This occurs if i use a Choice in the Document Owners list, or if i do a lookup from the Department List.

My preferred method of implementing this system would be to have a multi-value lookup field in the Department List for Document Owners so that the Owners are attached to the Department, and if the owners change for the department they also change for the document that is for said department.  But, i run into the same issue that i c

Calculated fields with cube filter



We have a simple calculated field in a cube that looks like this:

[Measures].[Value] * [Measures].[Factor]

This works great when we slice it year by year in rows. The problem is when we use year as a filter in the cube browser (BIDS) we always get the same total, no matter what years we have selected.

How can we make the filter work with calculated fields?

Best Regards


Get the total of calculated fields


Hey guys I kinda need your help on this.

I have a field called: amount
I have a field called: Costs per item (different per item)
And I have a calculated field called: Total Costs

Now I want to know the Total Costs of all items.
So in SharePoint Designer 2007 I made a custom listview and though I could do something like "sum($Rows/@Total_x0020_Costs)"
To bad its returning a NaN (Not A Number).

I think I know why it's doing this, but I don't know how to solve it.
Any Idea's?

Validation rule on fields with calculated values


Using Infopath 2010.

I used the rules wizzard to add a rule to a field that has a calculated value property and I tried eveything to get this to work. Is this rule suppose to work.

Check calculated value field (week1)- validate as error if greater than 7.

Here is the rule:


Week1 > 7      and
Week1 is not blank

Rule Type:


I expected this to work.

Appreciate confirmation that is is suppose to work. 



Can a calculated value be based upon existing calculated value fields?


So I would like to confirm something. Can I have a calculated value be based upon existing calculated value fields? Example....


Qty   Amount   Total


Sub Total


Total would be a calculated field (qty * amount) and then would like to sum all of the totals and have that be the sub total.


Appreciate your help.


Kipp Sorensen

Displaying SharePoint lists in Web Parts

When you create a built-in or custom list in Microsoft Windows SharePoint Services, Windows SharePoint Services creates a Web Part, a basic building block of a SharePoint site, to display that list. These Web Parts are called List View Web Parts. Windows SharePoint Services stores List View Web Parts in the site collection Web Part gallery. (The site collection Web Part gallery is the most central gallery of Web Parts for a work group. By default, the gallery name is the name of the site, such as "Our Team Site Web Part Gallery." )

SharePoint Tutorial - Lists

A list is a feature in SharePoint that stores a lists of information. For example, a list can be created to store web links in the human resources team site. A list is usually created for a specific type of information. Lists can contain metadata to describe the particular information in more detail and to make it easier to find.

Creating Sites/Lists/List Items under Current User Context in SharePoint By Using SPUserToken

Usually we do this by performing the action under RunWithElevatedPrivileges method and updating the listitem using SPListItem.SystemUpdate() method (see here). but this approach has its own flaws like (RunWithElevatedPrivileges will run under system account, we cannot use SystemUpdate for SPSite,SPWeb,SPList, since it runs under system we will "CreatedBy" by as SystemAccount).

Create ID (uniqueid?) from two fields when data is entered


I need to create an ID from two fields when they are entered into the db for the first time.  I thought Uniqueidentifer would do this, but it looks like uniqueidentifier is random and i have no control of the process. 

My user will enter 4 letters into a column called INIT and 4 numbers into a column called NUMB.  What I would like to do is create an id by combining those fields.

How can I do this?



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