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

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

Summing a calculated column with comma's in sharepoint designer

Posted By:      Posted Date: September 29, 2010    Points: 0   Category :SharePoint


Sharepoint designer has the trait of getting goofed up with calculated columns that display with a comma.  I typically deal with this by doing a format-number(number(translate(@MyCalculatedColumn,',',')), ###$%%^formatstuff).  this replaces the comma's with nuthing so it will format as a number.

I'm trying to do a sum now...is this possible?


  <xsl:variable name="Rows" select="/dsQueryResponse/Rows/Row[contains(@FileRef,$TheIDweWant)]"/>
  <xsl:variable name="zNumMales" select="sum($Rows/@MaleLives)"/>
  <xsl:variable name="zTotalMaleVolume" select="sum($Rows/[number(translate(@MaleVolume,',','))])"/>

The zNumMales works fine...it's just a number column populated by a workflow.

The zTotalMaleVolume is calculated, has commas so it displays as blank, we need to get rid of the comma's.  the above syntax is upchucked...anyone happen to know what it is?



View Complete Post

More Related Resource Links

Sharepoint: In Calculated Column, Code with multiple "IF" condition does not work.

Implemantation:  Calculate expected resolve date exclude "Saturday" and "Sunday"  based on Priority and Severity.Columns are:1. Priority:2. Severity:3. Raised on: Date record createdCode: Below is the code which contains multiple "If" conditions. For quick undersatnding, i separated major If condition. Below code does not work and sharepoint gives me Sytax error message. =IF(OR(Priority="Critical",Severity="Critical"),IF(TEXT(WEEKDAY([Raised on]+1),"dddd")="Saturday",[Raised on]+3,[Raised on]+1),     IF(OR(Priority="HIGH",Severity="HIGH"), IF(TEXT(WEEKDAY([Raised on]+1),"dddd")="Saturday",[Raised on]+4, IF(TEXT(WEEKDAY([Raised on]+2),"dddd")="Saturday",[Raised on]+4,[Raised on]+2)) ,   IF(OR(Priority="MEDIUM",Severity="MEDIUM"), IF(TEXT(WEEKDAY([Raised on]+1),"dddd")="Saturday",[Raised on]+5, IF(TEXT(WEEKDAY([Raised on]+2),"dddd")="Saturday",[Raised on]+5, IF(TEXT(WEEKDAY([Raised on]+3),"dddd")="Saturday",[Raised on]+5,[Raised on]+3)) ) ,   IF(OR(Priority="LOW",Severity="LOW"), IF(TEXT(WEEKDAY([Raised on]+1),"dddd")="Saturday",[Raised on]+6, IF(TEXT(WEEKDAY([Raised on]+2),"dddd")="Saturday",[Raised on]+6, IF(TEXT

Use Sharepoint Calendar Start Time field in calculated column

I'm trying to limit the calendar view to current week using the Sharepoint defined field Start Time. However, when I display the serial number behind the Start Time it looks like it is actually giving me the serial number for the Created Date field. I believe it is because the appointment is reoccurring but I'm hoping there is a way around it. I created a new testdate field and manually entered the date and set those appointments as all day events however they are not reocurring appointments. The testdate returns the correct serial number however the start time returns an incorrect serial number. SerialNumber1=DATE(YEAR([Start Time]),MONTH([Start Time]),DAY([Start Time])) SerialNumber2=DATE(YEAR([testdate]),MONTH([testdate]),DAY([testdate])) Start Time  SerialNumber1 Testdate  SerialNumber2 8/31/2010 40420 8/31/2010 40421 8/31/2010* 40405    9/1/2010* 40405    9/2/2010* 40405    9/7/2010 40427 9/7/2010 40428 9/13/2010* 40405    9/14/2010 40434 9/14/2010 40435 9/14/2010* 40405    9/15/2010* 40405    *These are reoccurring appointments scheduled as all day events. The others were entered as one time appointments scheduled as all day events.

How do I get column values in Sharepoint designer so I can use them as a variable in code block?

The code below is in my EditForm.aspx and it works but instead of it outputting "This is just a test!" I need get a number that is stored in a column named Phone Number that has 5555555555 stored in it and have the line that says TD2.innerHTML = "This is just a test!"; ouput what ever number is stored in the Phone Number column. Here is the code that is in my EditForm.aspx <script type="text/javascript">function DisplayItemID(){       var TD1 = document.createElement("TD");       TD1.className = "ms-formlabel";       TD1.innerHTML = "<h3 class='ms-standardheader'>Test</h3>";       var TD2 = document.createElement("TD");       TD2.className = "ms-formbody";       TD2.innerHTML = "This is just a test!";       var IdRow = document.createElement("TR");       IdRow.appendChild(TD1);       IdRow.appendChild(TD2);       var ItemBody = GetSelectedElement(document.getElementById("idAttachmentsRow"),"TABLE").getElementsByTagName("TBODY")[0]; 

Sharepoint Designer 2010 modified view breaks "hyperlinks" column and formats all hyperlinks to the

I have been trying to perform a simple task with sharepoint designer 2010 that keeps breaking one of my list colums (in the custom view that is).  Background:  I have a list that we are using to assist with Document control in our organization.  The list consists of a few columns: Document number, Title, Owner, Doc Type, and file link (hyperlink to a pdf).  When I create a new out of the box standard view, everything works as desired.  However, I need to adjust the column widths on a couple columns in SharePoint designer, which seems to break the file link column functionality (all of the hyperlinks are now formatted to go to the same document, thought the file paths in each list item are correct).  Funtionality of the file links column works perfectly, until I make a single change to the view in SharePoint designer and save.  Any insight on this issue would be greatly appriciated.  

Sharepoint Designer - Conditional Formattting with column not in view


I'm trying to apply conditional formatting to a view and it works, but only if all the columns the conditional criteria are based on.  

This sort of defeats the purpose since I want to just highlight an the Title of the list item if a column within the list item that is not currently visible meet my criteria. I'm trying to save screen real estate space by displaying fewer columns and also to try to increase page rendering time. However, I doubt I'd really be decreasing page load times if I'm still requiring even data that is not displayed to be read.  

Anyone know of a workaround?  

Sharepoint Calculated column with [Today]



I am using Sharepoint 2007 Enterprise edition.

I have two columns called Start Date and End Date (both of datetime type). These columns are used to maintain start date and end date of a contractor in a company. I have a calculated column (called Status) which displays "Active" or "InActive" depending on the below mentioned conditions.

I used this formula :

=IF(OR(OR(AND((Today>[Start Date]),[End Date]=0),AND((Today=[Start Date]),[End Date]=0)),OR(OR(AND((Today<[End Date]),(Today=[Start Date])),AND((Today<[End Date]),(Today>[Start Date]))),AND((Today=[Start Date]),(Today=[End Date])))),"Active","InActive")

This is working but not updating the value correctly. I think Today value is not getting updated dynamically.

I have 5 conditionds:

1. Start Date < Today (Where End Date =0)

or Start Date = Today where (End Date =0)

or Start Date < Today < End Date

or Start Date < Today and Today = End Date

or Start Date < Today and  End Date > Today

Any help is appreciated.

Thanks in advance.

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?


SharePoint Designer

This video series shows you how to quickly and easily build complex business solutions on the SharePoint platform. Microsoft Office SharePoint Designer 2007 Business Administrator Training is a one-and-a-half hour, 300-400 level training series, produced in collaboration with the SharePoint Product Team and Total Training

Trying to send email using Sharepoint Designer 2007 workflow and email enabled list


I have a a list that recieves email. I have few fields that shows me the originator: "E-Mail From" and "E-Mail Sender".

I am trying to create a workflow that will generate an auto reply to the originator but the SPD fails to recognize the email address in these two fields. It's either truncating part of it or uses the html ( href=mailto:Demo@DemoSomething.com) in the To field.

Thank you,


How can I implement this workflow scenario with SharePoint Designer?



I have a document content type and a library which contains this content type. here is what I want to do:

- when user creates a new document in this library, he will enter some user  names with people picker and then a message including some columns of the content type will be sent to that users. And then, at a certain date (lets say 1 day before a date that is one of the site columns) another email, a reminder will be sent.

I havent been able to find :

1- how can I replace a people picker field on workflow initiation form and how can I make it sent email to the user.

2- How can I make it sent a reminder email 1 day before the date that is stored in one of the columns of the content type(current item)

any help would be welcome,


Duplicate column names from forms in SharePoint lists



I'm in the process of migrating from a WSS 2 site to WSS 3/MOSS. On the old site I used an Infopath 2003 form for absence requests. During the migration I now use Infopath 2007. There wasn't any problem initially when the form was stored with the SharePoint form library. However, when I published the form as a content type from Infopath 2007 and then added that content type to the form library, there are two columns for each piece of data from the form. (One from the content type and one from the form list.) I relinked each old form (list content type) to the new AbsenceRequest content type and removed the original one from the list. However, the duplicate column names are still there. Since they came from the Infopath form, they are not editable or deletable from the SharePoint list management interface. The duplicate column names make it tough to build views since it isn't apparent which column to use in the form building UI. It can be determined form the overview display, but it is very cumbersome.


Does anyone know a way to get rid of the old, absolute, columns?

How to tie a dropdown list from a nother table to a dataview in sharepoint designer



i created a dataview for a user table to insert new records. now i have to use a dropdown list that get data from another table. to insert in my user table. in the user table only the code is stored. but i need to get that code description that is in another table in my dropdownlist to choose from in my dataview.

how can i do this in sharepiont designer2007?

create current user filter in sharepoint designer or wss3

hi, how can i create a current user filter in sharepoint designer?

How to get character count in 'Multiple Text 'column using Calculated Column?


Hi All,

I have a multiple text box in a list

I want

  • A column which lists number of characters in multiple list column example 188, 199 etc
  • Multiple character column must not have more than 200 chars
Is this possible?

Appreciate all the help!


Sharepoint list group by column data ,display in webcontrol like panel or label


I  have a sharepoint list[Managers] with groupby sector column. like below




Each Sector group by column data i want to display in label or panel control.

How to do that ? how to write the logic?



Regards, Mansoor

How to Establish a Remote Web Site Connection in SharePoint Designer 2007


I am modifying a SharePoint site and so far so good.  Some of the objects were created using Visual Studio 2008 (C#).  I was able to modify these objects and implement them on the targete machine without issue.  The final step is to implement the ASPX pages that were modified using SharePoint Designer 2007.  These are aspx pages that are used to modify items in lists.  All the pages involved in this upgrade are customized.  I need to upgrade the target site with the modified version of these pages.  My intent is to copy the code from the page in the source site and past it into the same page on the target site.  I tried using the Remote Web Site connection tool in SharePoint Designer 2007 but received the following error message:

"Unable to open 'https://(site address)'.  Server Error:  Could not find a Web server at 'website'.  Please check to make sure that the Web server name is valid and your proxy settings are set correctly.  If you are sure that everything is correct, the Web server may be temporarily out of service."

I am not sure how to first check to see if the Web Server is temporarily out of service.  I would appreciate your input on how to verify this.

Background information of target machine:  WinServer 2008, IIS 7, Sharepoint (MOSS2007), site on port 80

SharePoint Designer: insert custom list not working anymore



Suddenly sharepoint designer decided today that it doesn't want to insert a custom list form anymore...
To be more specific, it doesn't work anymore in a site that uses the Microsoft budgeting and tracking template. In a website that uses an out of the box template, it still works.

It did work before, because I did it in other websites using the same template (it's broken there as well now).

Why oh why does SharePoint refuse to do this now?
I searched google and here on the forums, but all I could find was some issues after installing SP1, but we did that already long time ago and it was still working after that. I checked with our infrastructure guys and they didn't install new updates they say.

I also tried the solutions listed here: http://blogs.msdn.com/spdsupport/archive/2008/07/03/how-to-fix-custom-list-forms-will-not-insert-or-show-up-on-the-design-surface-of-sharepoint-designer.aspx
But they don't fix the problem.

So my problem is, I can go to Insert > SharePoint Controls > Custom List Form
I pick my list, content type and form type, I hit OK and... nothing happens.

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