.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

Calculated Column with Embedded Link

Posted By:      Posted Date: October 27, 2010    Points: 0   Category :SharePoint
MOSS 2007 - I'd like to create a calculated column in a List that presents itself as a link (<a> tag) similar to how the Title column has version for Edit and View links (rather than simple text).  Is is possible top mimic this OOTB behavior?

View Complete Post

More Related Resource Links

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!


Creating a custom column with a link to document (other than the name field) in document library



I have a document library with the standard name column linking to the document. However, we'd like to create a custom field and have that link to the document (and edit item menu).

How is this best accomplished?

Thanks in advance!


Trying to set Calendar Time Interval Using Calculated Column, but getting Error



So i was trying to use a calculated column that added 7 days to the start date of a calendar item. The calculated column worked fine because i checked with several tests. Then i tried using the Column as the End Time in the Time Interval Setting in the Calendar View. This broke Sharepoint. Not the normal graceful error im using to seeing from Sharepoint but the Server Error Page when a dump happens in a ASP page. I havent enabled the full error page because i assume its not like i can fix it, i dont have the source code.


Does anyone else experience this? If so is it a known problem and being worked on?




How do I modify the link of a Hyperlink column ?


OK , I'm a bit new to this game. I'm trying to build a web page that simply scans a directory in the server and creates a web page with links to the files in that directory - sounds simple and should be easy to do !

So I have a bit of code that reads the myDocuments folder in my web site and then populates a grid view hyperlink column with the filenames in the folder - wow it works !

The only thing I am struggling with now is getting the hyperlink correct within the GridView so that the user goes to the actual document.

So my code behind is;

Dim dirInfo As New System.IO.DirectoryInfo(Server.MapPath("~/MyDocuments"))  
       articleList.DataSource = dirInfo.GetFiles()  

which reads the file info in the directory myDocuments and binds the info to a datasource.

So now I'm using that datasource to display the filenames in a gridview so that the user can click on a name and open the file.

computed column specification - When is it calculated?

on insert , select...?  It's better than Trigger? thanks.  

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.

using [content type] in calculated column

I want to get the content type in the calculated column. [content type] is available in Moss not able to use that in 2010. Any idea?

Need to link multiple External Content List items to a single document metadata column

I have an external content list - for my purposes, the data isn't any fancier than a list of terms provided by a web service (read only - I don't need update/delete functionality). I want to be able to link any subset of those terms to a single document metadata column (in other words, I need it to work like a normal content list that is defined to allow multiple values in a column) but SharePoint doesn't let me do that on an ECL. I need the content list to be externally driven since more values are going to be added to an outside system over time, but I think it's possible that I may not need a full-fledged ECL list to make this work this way in SharePoint. Just to clarify: I don't need the metadata values in my documents to maintain a PERSISTENT link to the web service (if someone changes an underlying value in the web service DB, it doesn't need to be updated in the document table too). I just want SharePoint to offer up an updated set of source values from the web service if somebody goes in and edits the document metadata. Any ideas for how I can make this work?

How to Change the Color of Link Label which is a Datagridview Column on a Row Selection?

Hi All I have a Link label as one of the column of Datagridview & also my SelectionBackColor set to Blue. Is there any way that i can change the link label color on a particular row selection as now my selectionbackcolor & link label color is matching...I am unable to the contents of that link label column. Should i do this on design level or in code level? Pls Help

Problem when using calculated column as column group in a view

Hi,   I have a list with a calculated column named 'FullName', the formula is: "FirstName & " " &  LastName". I created a view group by 'FullName' column. The follow error appeared on the column:   &lt;!-- #RENDER FAILED --&gt;   Please help

Weird Date vs Date/Time issue using a calculated column

I'm attempting to use the fab 40 attendance template. I don't need the time to show - Im able to hide that on the forms with jquery (endusersharepoint.com thank you!!) I WAS ATTEMPTING to create a calculated column called Start Date where the formula simply reads '=[Start Time]' When it's set to display 'Date Only' the date is off by a day. If I switch it to 'Date & Time' I get the correct date. Huh?

Set a Calculated column as hidden in a content type

Hello, I'm building a custom list with several columns, including a Calculated column. This calculated column simply takes the value of a choice column in the same list to convert this value to a single line of text value. I do this because when adding a lookup column to this list, I cannot select Choice columns as additional columns, but I can add the calculated column. Speaks for itself that this calculated column only needs to exist in the background, and end users should not see this column in the Add/Edit/Display forms. In add/edit forms the column is not displayed, but in the display form it gets displayed. Piece of cake I thought, I'll just set it as hidden in the content type used for the list. When I open the column the column settings (required/optional/hidden) is grayed out, so I cannot set it to hidden. In SP2007 this was possible, why can't I do this anymore in SP2010? Do I miss some feature in order to do this, or is there a good reason why this seems to have changed in SP2010?

Calculated column and hyperlink field type

Hi I have customer who is asking me if this is possible to provide filter based on the HyperLink field, where he could easly limit results to only those items where link field is filled. As filtering on hyperlink column type is not supported I was thinking to buld some calculated field based on it to return YES (if link is provided) or NO (if link is not provided). The problem is that hyperlink field type is not avialiable on the list of field to be used on calculated field. is there some workaround for that ? thanks for help   Mariusz Gorzoch Blog : http://mariusz.gorzoch.pl Twitter : http://twitter.com/MariuszGorzoch Facebook: http://www.facebook.com/mariusz.gorzoch

Adding a column from another List to a Dataview? Must I link sources or can I just add a new data so

Using Designer, I added a dataview to a webpart page and dragged in a single list source. It works as expected. I now want a column from another list in my view. Must I link in another datasource, or can i just insert the data source for the second list into my datasources? The new datasource is there in the code and I see the caml select for it. but my XSL still does not find data: <xsl:value-of select="/dsQueryResponse/Master/Rows/Row[@ID = current()/@Key]/@Lastname" /> I noticed my new columns are not in the <datafields> tag, I tried adding them but it did not help. If Master is my lookup list , @Key is the dataview I will match with and @ID is the column in Master, and @Lastname column I want to return, is the above syntax correct? Many Thanks.    

How can I switch the "Linked to document" link from the 'name' column to another column e.g. title

In SP2010 it is not possible to click on the icon to open a document in a list web part. Therefore I want to move the 'linked to document' feature from the name colum to the title column (as I do not show the name colum on the site). How can I do it or how can I make sure that clicking on the document icon leads me to the document and not to the edit menu?

Error when trying to add calculated column: ' Item has already been added. Key in dictionary:'

I created a subsite under a subsite in my MOSS 2007 site collection. Then I am trying to create a 'local' site content type for Quizzes. Next I am trying to create a calculated column and right after I specify Calculated Column as the type I get a mysterious error Now, Root Cause Analyst Name is a    Root Cause Analyst Name is a site column defined in the Root web, and referenced in the parent subsite, but it has nothing to do with my present effort. ? Can I not create content types in a sub-sub-site, or should I create them all in the root web? Here's the error:     Item has already been added. Key in dictionary: 'Root Cause Analyst Name_Root_x0020_Cause_x0020_Analyst_x0020_Name'  Key being added: 'Root Cause Analyst Name_Root_x0020_Cause_x0020_Analyst_x0020_Name'   at System.Collections.SortedList.Add(Object key, Object value)    at ASP._layouts_fldnew_aspx.__Render__control10(HtmlTextWriter __w, Control parameterContainer)    at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)    at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)    at System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer)    at System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output)    at
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