I am using search core web part to display the results of my search. I have added a column in xslt so that it displays ProjectId in the search result. I am using BCS to search an external database. I would like to make projectid a link. the url of this project is stored in a list called referenceList.

Here is an exmaple:

**SQL Database table:**

**ProjectId | Project Name | Project Description** 
1           Proj 1         some description
2           Proj 2         some other description

**Referencelist (in sharepoint)**

ProjectId | ProjectUrl
1         | http://google.com
2         | http://gmail.com

Results in Search Core Web part
ProjectId <Link> | Project Name | Project Description 

What is the best way to retrieve the projecturl in ReferenceList (custom list) from within the xslt in Search core web part? Can I use xslt list view web part? at the moment I am modifying the xslt of the search core web part.

Can you provide me some examples or references or ideas as to how can I do this?

Thank you very much. Please it is urgent.

  • What about storing Project Url in the SQL database? Commented Mar 21, 2013 at 12:50
  • No I cannot do that. No extra columns can be created in SQL. It has been decided like this. So the url has to be store in SharePoint list and retrieve it from there.
    – Imir Hoxha
    Commented Mar 21, 2013 at 15:28

1 Answer 1


If I am understanding correctly, the data is unrelated as far as search is concerned as it is coming from two different places. This means you will not be able to achieve this simply using XSLT.

You could possibly embed some jQuery in your results page which gets the URL from the related list using SPServices or REST.

  • Hi Dave, the only relationship between search results and custom list is the ProjectID. They both have a common project id. So I was wondering what will be a good way to retrieve the information in the custom list based on the projectId that the search result returns back. The information that I retrieve from custom list has to be displayed in the search result. So it is like kind of joint.
    – Imir Hoxha
    Commented Mar 21, 2013 at 12:03
  • OK - so as suggested above it sounds like SPServices or REST is the way to go. I would probably use XSLT to format the output you want including a placeholder for the URL then have a jQuery script loop through the results, getting the URL using REST or SPServices and then writing to the relevant placeholder. Good luck. Commented Mar 21, 2013 at 21:26
  • Yes I am using xslt of the Search core web part. So, is it possible to use the object model inside the xslt web part to look up the columns in the custom sharepoint list?
    – Imir Hoxha
    Commented Mar 22, 2013 at 11:00
  • XSLT is server side and jQuery is client side so as suggested above I would do one and then the other. Commented Mar 22, 2013 at 12:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.