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


Top 5 Contributors of the Month
satyapriyanayak
SP
Sambanthamoorthy
Ashutosh Jha
Imran Ghani
Post New Web Links

Business Data List web part, format field from database as hyperlink

Posted By:      Posted Date: November 16, 2010    Points: 0   Category :SharePoint
 
Hi,

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.
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.
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?

tnx in advance


Jan D'Hondt - Database and .NET development


View Complete Post


More Related Resource Links

Join Entities in BDC For Business Data Field In List

  

 

I'm having a devil of a time joining two tables for a BDC to be used as a Business Data field in a list. I've seen plently of examples  connecting two tables to use with web parts, however i haven't seen anything about using an association in a list. Before i continue to beat myself up i need to know that this is possible.

 

If that's confusing here's what i'm trying to do.

I have two tables Locations and Region. I need the Region_Name from the region table based on the Location_Id (primary key) from the Location table. Locations is connected to Region by Region_id as a foreign key.

 

Any help would be immensely appreciated.


Data Form Web Part - Sharepoint Dropdown List as a field in Edit View - Possible?

  

Hi guys,

I'm building a Sharepoint page with a data form web part that uses custom SELECT and UPDATE statements with an SQL Server connection in order to retrieve and store records of information.

I'm getting along fine, records seem to update how they should etc, but I've ran into a problem with one thing: Sharepoint dropdownlists in 'Edit Template'

So the issue is this: if I replace a textbox field with a dropdown list that is populated with a separate SQL datasource, the dropdown list seems to be unable to show the current value of the field.

E.g. I have a dataview which has a field "FruitID", which I can update just fine by setting the ID value to different numbers. The SQL datasource uses the FruitID to display a list of all available Fruits, (e.g. 1 = Banana, 2 = Apple, 3 = Cherry, etc).

If i open the dataview in editmode, the default value in the dropdown is null, despite the real value of the field being "2", which should show "Apple" in the dropdown.

I can select a fruit and click save, and it will update just fine. But the initial display needs to show the correct value to start with.

Is there a custom binding I should be coding to make this work? I can't configure dropdown <items> on an individual level as they are populated from the SQL server. I can't set "SelectedI

Web Part List - Business Data List missing?

  

Hi there,

I am working with sharepoint 2007and I am trying to add a webpart list, specifically a Business Data List.

I am trying to do it through Site Actions> Edit Page.

Any clue?

 

Thanks in advance,

Joss83


Column filter in Business Data List web part does not work for all fields

  

I have a BDC entity whose fields contain a variety of data – numbers, dates and strings.  When I use the business data list web part I find that some of the columns’ dynamic filtering (accessed from the list’s column header) doesn’t work.  For these problem fields, the filter values load correctly but when I select a value all records disappear.  Initially I thought this was limited to just string columns but there is one string column that does filter correctly.

Here are some things that may be useful to know:

1.       The datasource is a SQL view and all fields are varchar(255)

2.

Show custom error message inside SharePoint Business Data List web part?

  
I am using SharePoint 2007 Business Data List web part to show external information retrieved from my simple web service. Is there ability to show custom error message on Business Data List web part?

Read data from BLOB field and write to sharepoint list

  
Hi, I want to read the data from BLOB field and write it into sharepoint list item. Please provide some pointer to archive above objective.   Thanks in Advance.

Calculated date field displays differently in List View and Data View web parts

  
In SharePoint GUI I created a simple custom list with a calculated Date/Time field (Due).  The calculation is =[Created]+7.  I'm trying to display this data on a page using a DVWP.  But first, for testing purposes, I also created a second calculated Date/Time (TestCreate) field in my custom list that is simply =[Created]. In the List View from within SharePoint, the dates show as expected (for example): Created = 8/12/2010 3:45 PM Due = 8/19/2010 3:45 PM TestCreate = 8/12/2010 3:45 PM In SharePoint Designer, I added a Data View web part and the above three data elements (each configured to display mm/dd/yyyy hh:mm:ss tt).  I see the time displayed for the example list item as: Created = 8/12/2010 3:45:30 PM Due = 8/19/2010 10:45:00 AM TestCreate = 8/12/2010 10:45:00 AM I've tested a couple scenarios and the calculated fields always display five hours in the past (along with dropping the seconds).  It seems like the DVWP is returning the date in a different time zone (with no seconds).  The lcid is set right (1033).  I didn't see any time zone settings for the DVWP specifically.  I'm basically stuck.  Could someone help me figure this one out. Thanks.

How to export data from a sharepoint list to a SQL database

  
hi, is it posible if i add some data in a sharepoint list that i can export these data to my sql server tables. or if i create a dataview for exapmle from databse A in SPD to use in my wss3 site and then export it to database B in sql server? thnx

Business Data List Menu Questions

  
I've got two questions relating to the business data list.  I took a look at the following article which seems to indicate this can happen, but I wasn't clear on how: http://sharepointmagazine.net/technical/administration/everything-you-need-to-know-about-bdc-part-4-of-8 First, in the section where it discusses the Business Data Actions, at one point it says "Incidentally, you can also access these actions by clicking the View Profile context menu as shown here", but I have yet to be able to get said context menu to appear in the data list.  I setup my BDC connection, have the data list displaying data, connected it to the actions webpart which shows the available actions, but there seems to be no context menu.  No dice here.   Second, in the Business Data List Advanced Settings section, it mentions "Keep in mind that the XSL contains not only the HTML results, it also contains the HTML for the selection criteria, the Actions toolbar, and the column headers."  I am wanting to add options in the mentioned Actions toolbar, but I don't seem to understand how to do so at this point.   Hopefully someone in this community can shed some light.  If I come across the answer, I'll be sure to update.

how to have a unique hyperlink that will add the data to a database

  
I have a webform that writes respondent info to a sql data base. I want to send a email campaign and use a unique identifier so that if 1. joe clicks on his link http://www.test1.aspx?209and 2. tim clicks on his link http://www.test1.aspx?603that when they click the form submit the data gets written into the correct row where 209 and 603 are their respondent numbers already in the data base.This is my first attempt using c# and I couldn't find anything in my books about it.ThanksBob

using a database field as a hyperlink query?

  
I have three tables in my sql database contactssurvey answersrespondent_initialContacts holds all customer data with custid. survey answers has assigned everyone how took the survey a number in a field called respondent_no.respondent_initial holds input from a webform where I populated it with the custid from contacts and respondent_no from survey answers before the webform input is inserted. I want to send an email to them that had there respondent_no in a hyperlink to the webform so that when they entered their data into the webform it would use the repondent_no to determine where to insert the form data.Example joe clicks http://www.myplace.com/order.aspx?23             Mike clicks http://www.myplace.com/order.aspx?125it would look up respondent_no (23) from the respondent_initial table and insert the data in that row in the database for joe's webform entry and it would look up respondent_no (125) from the respondent_initial table and insert the data in that row in the database for mike's webform entry.my code behind looks like this// Create command                comm = new SqlCommand("INSERT INTO respondent_inital (Practice_Name, Address1, Address2, City, State, Zipcode, Phone, Email, Contact, Dealer, item_9223, item_9129, item

Slow performance when searching in "any part of field" of a SQL Server database using a Microsoft Ac

  
We have just migrated our back end database from Access to MS SQL Server 2008 R2. We have noticed better performance on our searches - unless we select to search in "any part of field" in Access (with Access' built-in search function - we use a mix of Access 2003 and 2007). This takes nearly 20 seconds to find the result, whereas before the migration it was taking 5-7 seconds (compared to instant results we now experience when searching for whole fields). The main fields we search are not large - usually just two words. Obviously it is better to search for a whole or start of a field, but this is not always possible. The contractor that assisted us in this project has told us that this "is just the way SQL works with Access". Is this really true? I find it hard to believe two MS products would have such a big issue between them. I presumed using SQL with an Access front end would be a common setup, which is why I thought this must be a problem with our setup. Is there any way to fix this speed issue?

Binding list to form not working with '&' character in list field data

  
Hi, I have a SharePoint list with a field called Title. I have a form based on this list with the field bound to the form as a label (for workflow to access). Here is the code for the form field. <asp:Label runat="server" id="ff2{$Pos}" text="{@Title}" __designer:bind="{ddwrt:DataBind('u',concat('ff2',$Pos),'Text','','ID',ddwrt:EscapeDelims(string(@ID)),'@Title')}" /> I have a workflow that runs through a form action button which take ff2 (title) and  does other stuff. The problem I have is with records where the value of 'title' contains the '&' character (example ab&cd). Blank is pulled in by the workflow when I get the value of ff2. I am guessing it has to do with the data binding and/or escape (special) characters coming through but I don't know how to fix it. Any help will be greatly appreciated

format-number issues with the Data View Web Part in SharePoint 2010

  
I have a number column named @Year_x0020_1_x0020_Revenue in the data view web part in SharePoint Designer 2010. In the Xpath expression builder - @Year_x0020_1_x0020_Revenue previews "500,000" If I use the format-number in the Xpath expression builder ==> format-number(@Year_x0020_1_x0020_Revenue, '$#,##0.00;-$#,##0.00'), it returns NaN. Is there any reason? 
Categories: 
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