SharePoint - How To add link in individual items on name field in Sharepoint Design

Asked By MD
11-Feb-12 08:47 PM

Hi,

i am trying to get list items from one site collection and display that data into other page, lets say which is in top level site page. so i am getting list items by using soap service.  but when i want to insert link on name field, it doesn't give me default view url into desiger. so my question is how can i add link for each individual items on name field. Should i create new column in xpath expression. plz let me know what will be the best approach that will be appreciated.

Thanks in advance

  D Company replied to MD
12-Feb-12 12:48 AM
Hello Friend,

if i could understand it clear than you want to modify a Data View in your intranet Web application to link .

Create or open a Data View of a SharePoint list, and then switch to Design view.
 Select the field value in the column in which you want to offer the hyperlink, and then click the arrow in the upper-right corner to show the Common xsl:value-of Tasks list.In the Format as drop-down list, click Hyperlink. If the Confirm dialog box appears, click Yes. Enter the URL. or text.

this is just a normal approach if all you want to do dynamically or using code that you can do using VS also.

traverse through each item of particular field and edit the items and add hyperlink to the text, than call acceptchage() method, this u can do under RunWithElevated priviliges.

or in SP designer use edit view of list items

Hope its clear to you!!
Regards
D
  kalpana aparnathi replied to MD
12-Feb-12 05:07 AM
hi,

Try this below example code for your solution


using ( SPSite siteCollection = new SPSite( "http://moss.litwareinc.com" ) ) {
  using ( SPWeb web = siteCollection.OpenWeb( "docs" ) ) {
    SPList list = web.Lists["Sample"];
 
    //link to the file
 
    StringBuilder builder = new StringBuilder();
 
    using ( TextReader reader = new StreamReader( @"C:\linktodocumenttemplate.txt" ) ) {
      builder.Append( reader.ReadToEnd() );
    }
 
    //replace string template with values
    builder.Replace( "{0}", fileLinkUrl );
     
    //should change the name of the .aspx file per item
    SPFile file = list.RootFolder.Files.Add( "link_title.aspx", UTF8Encoding.UTF8.GetBytes(builder.ToString()));
 
    //set list item properties
    SPListItem item = file.Item;
    item["Content Type"] = "Link to a Document";
    SPFieldUrlValue itemUrl = new SPFieldUrlValue();
    itemUrl.Description = "From sample code";
    itemUrl.Url = fileLinkUrl;
    item["URL"] = itemUrl;
    //persist changes
    item.Update();
  }
}


Thanks,
  MD replied to D Company
12-Feb-12 10:52 AM
Hi D Company,

Thanks for your reply. As you said i can use Common xsl:value-of Tasks and from drop down can choose hyper link and then url or text. But problem is when i am choosing Data field as m:properties/d:name its giving me this url https://intranet.org/global/jol/SitePages/introduction.aspx, it doesn't let me go anywhere. but i need to get the folling url by choosing Data field https://intranet.org/global/jol/abm/Pages/introduction.aspx. As you already know i am trying to get list item from other site collection by using web service in sharepoint designer. please help me out if you have any more idea. how can i achive this functionality for each field in the column.

Thanks
MD
  D Company replied to MD
12-Feb-12 12:26 PM
Sorry for delay reply.

In this case u have to fetch text only, and than create dynamically link control(through code)and than assign the text to it.

regards
D
  MD replied to D Company
12-Feb-12 01:05 PM
Hi D,

appreciate for your reply. could you help me details? actually i am new in sharepoint. so at first how can i fetch text, and then how can i create link control though code and assaign the text to it. should i use x path expression?

Thanks
MD
  Somesh Yadav replied to MD
13-Feb-12 06:40 AM
Hi friend dont worry just go through the below link  it is very clearly explained about how to add link in individual items on name field in sharepoint designer,

http://office.microsoft.com/en-us/sharepoint-designer-help/customize-data-views-and-forms-using-sharepoint-designer-HA101631678.aspx

I hope it helps you.
  MD replied to Somesh Yadav
13-Feb-12 12:39 PM
Hello My friend,

i haven' seen anything related with, how to add link in individual items on name field in sharepoint designer. can u provide details with this?

Thanks

Create New Account
help
the right permissions on the content type. Then, I created a column "external data" in Sharepoint that I linked to my content type. When I want to change the data in EventID Level Message Correlation 11 / 13 / 2011 00:08:30.31 w3wp.exe (0x1D9C) 0x1038 SharePoint Foundation Monitoring nasq Medium Entering monitored scope (Request (GET:http: / / tricoflex:80 / CRM / _layouts / FldNewEx Cust%2E%20Relation%20ID&DescriptionParam = &VldFormulaParam = &VldMessageParam = )) 11 / 13 / 2011 00:08:30.31 w3wp.exe (0x1D9C) 0x1038 SharePoint Foundation Logging Correlation Data xmnv Medium Name = Request (GET:http: / / tricoflex:80 / CRM / _layouts / FldNewEx e307-4c5d-b470-c4351e5dff53 11 / 13 / 2011 00:08:30.32 w3wp.exe (0x1D9C) 0x1038 SharePoint Foundation Logging Correlation Data xmnv Medium Site = / 9694064f-e307-4c5d-b470-c4351e5dff53 11 / 13 / 2011 00:08:30.35 w3wp.exe (0x1D9C) 0x1038 SharePoint Foundation Monitoring b4ly Medium Leaving Monitored Scope (Request (GET:http: / / tricoflex:80 / CRM / _layouts / FldNewEx e307-4c5d-b470-c4351e5dff53 11 / 13 / 2011 00:08:30.45 wsstracing.exe (0x06A0) 0x17A0 SharePoint Foundation Unified Logging Service b9wt High Log retention limit reached. Log file 'C: \ Program Files log' has been deleted. 11 / 13 / 2011 00:08:30.45 wsstracing.exe (0x06A0) 0x17A0 SharePoint Foundation Tracing Controller Service 8096 Information Usage log retention limit reached. Some old usage log files have been deleted. 11 / 13 / 2011 00:08:30.57 w3wp.exe (0x1D9C) 0x1038 SharePoint Foundation Monitoring nasq Medium Entering monitored scope (Request (GET:http: / / tricoflex:80 / SiteAssets / SitePages / Accueil
project con sharepoint SharePoint SharePoint Portal Server Dev Discussions Sharepoint (1) Laurent (1) Cotton (1) Conectarme (1) Intentar (1) Liliana (1) Error (1) Project (1 Laurent Cotton www.bewise.fr es un error que sale al intentar conectarme con el sharepoint keywords: project, con, sharepoint description: !- - Web.Config configuration File- - configuration system.web customErrors mode = On deafaultRedirect = mycustompage.htm system
access into sharepoint SharePoint Sharepoint is new to my organisation and we are on the verge of deploying it to and import those? How have others resolved this issue? Your help is most appreciated, Matt SharePoint Discussions SharePoint (1) InfoPath (1) WSS 3.0 and MOSS 2007 (you didn't say which SharePoint product *and version* you were asking about) allow you with Access 2007 to synchronize (in both directions) Access tables and SharePoint Lists. It probably works in both directions (with some restrictions on field types used) although and then open that file using the template you created in InfoPath. keywords: access, into, sharepoint description: Sharepoint is new to my organisation and we are on the verge of deploying
Office SharePoint, Windows SharePoint and SharePoint Portal SharePoint Hi, I am a novice about SharePoint. Can anybody tell me if Office SharePoint, Windows SharePoint and SharePoint Portal are same thing? same server application? or what is the different among them? Thanks