Business Data List web part, format field from database as hyperlinkHi,<br><br>I have a BDC with an entity that selects fields from a table. One of the fields is the full pathname to a file, or it could be a hyperlink. <br>When I display the entity in a Business Data List Web Part, all fields are displayed as text, without any formatting. I know the formatting can be modified using the XSL editor (under modify web part), I have found a sample with date-time format . Some basic formatting can also be done with de sharePoint designer, but nowhere have I found an example that allows me to format the column with the link as a clickable hyperlink. <br>My strong points are sql server and .net , but not XSL , can anyone give me an example of how th eformatting needs to be done in XSL?<br><br>tnx in advance<br><br> <hr class="sig">Jan D'Hondt - Database and .NET development© 2009 Microsoft Corporation. All rights reserved.Thu, 08 Jan 2009 13:13:12 Z0b429d9e-cbb3-4ab4-ab37-07b1769ba68dhttp://social.msdn.microsoft.com/Forums/en-US/sharepointbdc/thread/0b429d9e-cbb3-4ab4-ab37-07b1769ba68d#0b429d9e-cbb3-4ab4-ab37-07b1769ba68dhttp://social.msdn.microsoft.com/Forums/en-US/sharepointbdc/thread/0b429d9e-cbb3-4ab4-ab37-07b1769ba68d#0b429d9e-cbb3-4ab4-ab37-07b1769ba68djandhohttp://social.msdn.microsoft.com/Profile/en-US/?user=jandhoBusiness Data List web part, format field from database as hyperlinkHi,<br><br>I have a BDC with an entity that selects fields from a table. One of the fields is the full pathname to a file, or it could be a hyperlink. <br>When I display the entity in a Business Data List Web Part, all fields are displayed as text, without any formatting. I know the formatting can be modified using the XSL editor (under modify web part), I have found a sample with date-time format . Some basic formatting can also be done with de sharePoint designer, but nowhere have I found an example that allows me to format the column with the link as a clickable hyperlink. <br>My strong points are sql server and .net , but not XSL , can anyone give me an example of how th eformatting needs to be done in XSL?<br><br>tnx in advance<br><br> <hr class="sig">Jan D'Hondt - Database and .NET developmentTue, 23 Dec 2008 14:36:26 Z2008-12-23T14:36:26Zhttp://social.msdn.microsoft.com/Forums/en-US/sharepointbdc/thread/0b429d9e-cbb3-4ab4-ab37-07b1769ba68d#8db5bc04-9f7e-4747-9387-201c3c315b53http://social.msdn.microsoft.com/Forums/en-US/sharepointbdc/thread/0b429d9e-cbb3-4ab4-ab37-07b1769ba68d#8db5bc04-9f7e-4747-9387-201c3c315b53Ben Cline1http://social.msdn.microsoft.com/Profile/en-US/?user=Ben%20Cline1Business Data List web part, format field from database as hyperlink Sure, here is an example of how I formatted a field to show an image: <a href="http://social.msdn.microsoft.com/Forums/en-US/sharepointbdc/thread/d2b18c36-c5b4-43d3-bae2-d9fd2b491a29">http://social.msdn.microsoft.com/Forums/en-US/sharepointbdc/thread/d2b18c36-c5b4-43d3-bae2-d9fd2b491a29</a>. In the web part properties you can see the default XSL and then find the field you want to modify. <br><br>If you want to format it for a hyperlink and the field name is LinkUrl you can do it like this:<br><br> <div style="border-right:#7f9db9 1px solid;border-top:#7f9db9 1px solid;font-size:11px;overflow:auto;border-left:#7f9db9 1px solid;line-height:100%! important;border-bottom:#7f9db9 1px solid;font-family:Courier New;background-color:white"> <table style="border-top-width:0px;border-left-width:0px;margin:2px 0px;width:99%;border-bottom:#eee 0px solid;border-collapse:collapse;background-color:#fff;border-right-width:0px" cellspacing=0 cellpadding=0> <colgroup> <col style="padding-left:10px;font-size:11px;border-bottom:#f7f7f7 1px solid;font-family:Courier New;white-space:nowrap"> <tbody> <tr> <td><font style="font-size:11px"></font><font style="color:blue">&lt;</font><font style="font-size:11px">xsl:element </font><font style="color:red">name</font><font style="font-size:11px">=</font><font style="color:blue">&quot;a&quot;</font><font style="font-size:11px">&gt;     </font></td></tr> <tr> <td style="background-color:#f7f7f7">   </font><font style="color:blue">&lt;</font><font style="font-size:11px">xsl:attribute </font><font style="color:red">name</font><font style="font-size:11px">=</font><font style="color:blue">&quot;href&quot;</font><font style="font-size:11px">&gt;</font><font style="color:blue">&lt;</font><font style="font-size:11px">xsl:value-of </font><font style="color:red">select</font><font style="font-size:11px">=</font><font style="color:blue">&quot;@LinkUrl&quot;</font><font style="font-size:11px"> </font><font style="color:blue">/&gt;</font><font style="font-size:11px">&lt;/</font><font style="font-weight:bold;color:black">xsl</font><font style="font-size:11px">:attribute</font><font style="color:blue">&gt;</font><font style="font-size:11px">    </font></td></tr> <tr> <td></font><font style="color:blue">&lt;/</font><font style="font-size:11px">xsl:element</font><font style="color:blue">&gt;</font><font style="font-size:11px">    </font></td></tr> <tr> <td style="background-color:#f7f7f7"> </td></tr></tbody></table></div><br>The above example assumes the LinkUrl has the absolute path in it. If you need to append text to the value and LinkUrl is a relative path you could do something like this:<br><br> <div style="border-right:#7f9db9 1px solid;border-top:#7f9db9 1px solid;font-size:11px;overflow:auto;border-left:#7f9db9 1px solid;line-height:100%! important;border-bottom:#7f9db9 1px solid;font-family:Courier New;background-color:white"> <table style="border-top-width:0px;border-left-width:0px;margin:2px 0px;width:99%;border-bottom:#eee 0px solid;border-collapse:collapse;background-color:#fff;border-right-width:0px" cellspacing=0 cellpadding=0> <colgroup> <col style="padding-left:10px;font-size:11px;border-bottom:#f7f7f7 1px solid;font-family:Courier New;white-space:nowrap"> <tbody> <tr> <td><font style="font-size:11px"></font><font style="color:blue">&lt;</font><font style="font-size:11px">xsl:element </font><font style="color:red">name</font><font style="font-size:11px">=</font><font style="color:blue">&quot;a&quot;</font><font style="font-size:11px">&gt;     </font></td></tr> <tr> <td style="background-color:#f7f7f7">            </font><font style="color:blue">&lt;</font><font style="font-size:11px">xsl:attribute </font><font style="color:red">name</font><font style="font-size:11px">=</font><font style="color:blue">&quot;href&quot;</font><font style="font-size:11px">&gt;http://www.mysite.com/path/</font><font style="color:blue">&lt;</font><font style="font-size:11px">xsl:value-of </font><font style="color:red">select</font><font style="font-size:11px">=</font><font style="color:blue">&quot;@LinkUrl&quot;</font><font style="font-size:11px"> </font><font style="color:blue">/&gt;</font><font style="font-size:11px">&lt;/</font><font style="font-weight:bold;color:black">xsl</font><font style="font-size:11px">:attribute</font><font style="color:blue">&gt;</font><font style="font-size:11px">    </font></td></tr> <tr> <td></font><font style="color:blue">&lt;/</font><font style="font-size:11px">xsl:element</font><font style="color:blue">&gt;</font><font style="font-size:11px">    </font></td></tr> <tr> <td style="background-color:#f7f7f7"> </td></tr></tbody></table></div><br>Let me know if you have any questions on this, I would be glad to help. <br><br>Thanks,<hr class="sig">If this answers your question, please use the &quot;Answer&quot; button to say so | Ben ClineTue, 30 Dec 2008 19:02:46 Z2008-12-30T19:02:46Zhttp://social.msdn.microsoft.com/Forums/en-US/sharepointbdc/thread/0b429d9e-cbb3-4ab4-ab37-07b1769ba68d#ac5c6b38-9eb8-4f85-b2bf-f9cb0836f377http://social.msdn.microsoft.com/Forums/en-US/sharepointbdc/thread/0b429d9e-cbb3-4ab4-ab37-07b1769ba68d#ac5c6b38-9eb8-4f85-b2bf-f9cb0836f377jandhohttp://social.msdn.microsoft.com/Profile/en-US/?user=jandhoBusiness Data List web part, format field from database as hyperlink Ben,<br><br>thank you for the reply.<br><br>this is what I cooked from your answer and some others that I found on the web. <br>Remember, the XSL I am editing is for a Business Data List web part. My Datafield contains an absolute url. so I had to find out where in the XSL was the formatting of the cell values (not the headers).<br><br> <h2 style="margin:12pt 0cm 3pt"><i><font face=Arial>Original XSL </font></i></h2> <p style="margin:0cm 0cm 0pt;line-height:normal"><font face="'Times New Roman'"> </font></p> <p style="margin:0cm 0cm 0pt;line-height:normal"><code><font size=2>      &lt;td class=&quot;ms-vb&quot;&gt;<br>        &lt;xsl:attribute name=&quot;style&quot;&gt;<br>          &lt;xsl:choose&gt;<br>            &lt;xsl:when test=&quot;$dvt_1_form_selectkey = @*[name()=$ColumnKey]&quot;&gt;color:blue&lt;/xsl:when&gt;<br>            &lt;xsl:otherwise /&gt;<br>          &lt;/xsl:choose&gt;<br>        &lt;/xsl:attribute&gt;<br>        <font color="#ff0000">&lt;xsl:variable name=&quot;fieldValue&quot;&gt;<br>          &lt;xsl:call-template name=&quot;LFtoBR&quot;&gt;<br>            &lt;xsl:with-param name=&quot;input&quot;&gt;<br>              &lt;xsl:value-of select=&quot;@DocumentationLink&quot; /&gt;<br>            &lt;/xsl:with-param&gt;<br>          &lt;/xsl:call-template&gt;<br>        &lt;/xsl:variable&gt;<br>        &lt;xsl:copy-of select=&quot;$fieldValue&quot; /&gt;<br></font>      &lt;/td&gt;</font></code></p> <p style="margin:0cm 0cm 0pt;line-height:normal"><font face="'Times New Roman'"> </font></p> <h2 style="margin:12pt 0cm 3pt"><i><font face=Arial>Modified XSL </font></i></h2> <p style="margin:0cm 0cm 0pt;line-height:normal"><font face="'Times New Roman'"> </font></p> <p style="margin:0cm 0cm 0pt;line-height:normal"><code><font size=2>      &lt;td class=&quot;ms-vb&quot;&gt;<br>        &lt;xsl:attribute name=&quot;style&quot;&gt;<br>          &lt;xsl:choose&gt;<br>            &lt;xsl:when test=&quot;$dvt_1_form_selectkey = @*[name()=$ColumnKey]&quot;&gt;color:blue&lt;/xsl:when&gt;<br>            &lt;xsl:otherwise /&gt;<br>          &lt;/xsl:choose&gt;<br>        &lt;/xsl:attribute&gt;<br>          <font color="#ff0000">&lt;a target=&quot;_blank&quot; href=&quot;</font><a title="mailto:{@DocumentationLink"><a>{@DocumentationLink</a></font><a></a>}&quot;&gt;<br>              <font color="#ff0000">&lt;xsl:value-of select=&quot;@DocumentationLink&quot; /&gt;<br>           &lt;/a&gt;</font><br>      &lt;/td&gt;</span></code></p> <hr class=sig> Jan D'Hondt - Database and .NET developmentTue, 06 Jan 2009 16:31:26 Z2009-01-06T16:32:20Zhttp://social.msdn.microsoft.com/Forums/en-US/sharepointbdc/thread/0b429d9e-cbb3-4ab4-ab37-07b1769ba68d#8d405823-4938-42b9-81c6-0854c503028dhttp://social.msdn.microsoft.com/Forums/en-US/sharepointbdc/thread/0b429d9e-cbb3-4ab4-ab37-07b1769ba68d#8d405823-4938-42b9-81c6-0854c503028dBen Cline1http://social.msdn.microsoft.com/Profile/en-US/?user=Ben%20Cline1Business Data List web part, format field from database as hyperlink I was definitely referring to the values not the headers, which are found in a different section of the XSL entirely. <hr class="sig">If this answers your question, please use the &quot;Answer&quot; button to say so | Ben ClineTue, 06 Jan 2009 16:57:26 Z2009-01-06T16:57:26Zhttp://social.msdn.microsoft.com/Forums/en-US/sharepointbdc/thread/0b429d9e-cbb3-4ab4-ab37-07b1769ba68d#410e7da2-c19c-4a39-b1d3-2d6fe34e5e58http://social.msdn.microsoft.com/Forums/en-US/sharepointbdc/thread/0b429d9e-cbb3-4ab4-ab37-07b1769ba68d#410e7da2-c19c-4a39-b1d3-2d6fe34e5e58jandhohttp://social.msdn.microsoft.com/Profile/en-US/?user=jandhoBusiness Data List web part, format field from database as hyperlinkThe solution I have shown above is for the values , not for the headers. I see a column headers like usual and the a series of rows with the cell values formatted as hyperlinks.  <hr class="sig">Jan D'Hondt - Database and .NET developmentThu, 08 Jan 2009 13:13:09 Z2009-01-08T13:13:09Z