.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

how to transfer data from list column to another column of the same list programmatically?

Posted By:      Posted Date: September 02, 2010    Points: 0   Category :SharePoint
I have a list and i want to transfer the data from column "Test Display Name" to "Test Display Name Dummy" at renamed it back to "Test Display Name" however i'm getting problem transferring the data. pls help. thanks actually the root problem is my list is not exporting to spreadsheet. i'm getting an error "An operation that uses the database driver could not be completed If the driver is a Microsoft driver, make sure the driver file isn't damaged, and if it is, reinstall the driver by reinstalling Microsoft Query. For other drivers, contact your database administrator or driver vendor." any idea how can i export this Private Sub UpdateTestName() Using oSite As SPSite = New SPSite("http://test_baseline:13838/") Using oWeb As SPWeb = oSite.OpenWeb("SharedArea") Try Dim oList As SPList = oSite.RootWeb.GetList("/SharedArea/Lists/Test Names") oList.Fields.Add("Test Display Name Dummy", SPFieldType.Text, True) oList.Update() For Each oListItem As SPListItem In oList.Items If oListItem.Fields.ContainsField("Test Display Name") Then oListItem("Test Display Name Dummy") = oListItem("Test Display Na

View Complete Post

More Related Resource Links

Use BDC data in list as multi-select column

I have a document library that uses values from another system for its metadata.  Right now, we copy the values from the primary system into SharePoint so users can choose them.  I want to find a way to use the BDC connection that I have set up to automatically pull those values.  The problem is that the current metadata is set to multi-select.  So, I have a file that is in the library and it can be used for multiple clients - clients is a column in my library and users can select many entries.  When I set up a column to pull BDC data, it only allows single entry.  Does anyone have any ideas?

Sharepoint list group by column data ,display in webcontrol like panel or label


I  have a sharepoint list[Managers] with groupby sector column. like below




Each Sector group by column data i want to display in label or panel control.

How to do that ? how to write the logic?



Regards, Mansoor

C# newbie stuck - trying to access column data in a SharePoint list in an SSIS script task

Hello, I'm sure this is the simplest question but I can't figure it out, even with Google's help. I am trying to stumble through some C# code in an SSIS script task and I am frustrated that I can't figure out how to do the easiest things.  I eventually want to find data in a column,and then use another list as a lookup to replace that value with another where the existing value matches a value in the lookup list.  So, the data in my (multiple choice) column might be "apples; bananas" and in another list I have a row that contains two columns, the first holding the value "Apples" and the second containing "Red Delicious" and my original column should read: "Red Delicious; bananas." But, alas, I can't even figure out how to see the data that is in a column. Here is my code: /*<br/> Microsoft SQL Server Integration Services Script Task<br/> Write scripts using Microsoft Visual C# 2008.<br/> The ScriptMain is the entry point class of the script.<br/> */<br/> <br/> using System;<br/> using System.Data;<br/> using Microsoft.SharePoint;<br/> using Microsoft.SqlServer.Dts.Runtime;<br/> using System.Windows.Forms;<br/> using Microsoft.SharePoint.Utilities;<br/> <br/> namespace ST_08becda4c05c49cd9f30ea76110076cd.csproj<br/> {<br/> [

Best way to display data of a single column from a Sharepoint Custom List

I'm trying to create pages that will automatically populate with data pulled from a sharepoint list (like title, department, contact info, etc.).   I'm using publishing pages. What would be the easiest way to do this, and how would I specify which data to pull from the list? For example, the page would be set up like this: [Title:biology] [Department:biology] [Contact Info:biology]   and when the page loads, it would look like this: Biology Lab Biology Department 123-456-7890   I want it to just pull the data -- I don't want a list view or anything like that.  I need this page to look pretty, and I need the each column's data to show up in a very specific place. How could I make pages that would do that?

Cannot delete external data list column due "Parameter name: combinedEncoded" error

Hello!   I migrated a Sharepoint 2007 to a Sharepoint 2010 by dbattach method. And now I want to delete the BDC list columns, but I'm getting this exception: System.ArgumentException:   Parameter name: combinedEncoded    at Microsoft.SharePoint.BdcClientUtil.SplitStrings(String combinedEncoded) What should I do to delete properly this columns?   Many thanks!

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.    

Create list column, if column does not exist programmatically

Hi, I want to create a column in  the list programmatically. I tried this, and it created the column. But I would like to check if the list column already exist and if column does not exist, would like to create the column. How to check if a list column exists and if it does not exist, create the list column. I have used this code: [CODE] SPList MyList; MyList = currentweb.Lists[Constants.listname]; MyList.Fields.Add("FilesCount", SPFieldType.Number, false); MyList.DefaultView.ViewFields.Add("FilesCount"); MyList.DefaultView.Update(); [/CODE] Thank you

How to copy a Column data from one List to another list whenever a new item created .


Hello ,


I have List A and List B

List A


Ticket ID

Column A

Column B

Column C


List B


Ticket ID

Column 1

Column 2

Column 3

I want to copy only Ticket ID from List A to List B , whenever a new item created in List A.

can you please give your thoughts?

how to do it?

Thanks in Advance!


Share Knowledge and Spread Love!

its showing weird binary data from the BDC data column in list

Hello Gentlemen,

Here I am experimenting the BDC with a simple example of pulling distinct data from a sql server 2005 to a sharepoint list column "SELECT distinct Color FROM Product" .


when i configured the bdc using Business Data List the data showing correct. But when I use this it in a list column with bdc data type its returnig me the binary type of data.
No exact match was found.

However in the bdc picker the data is displaying properly. The data type in sql is nvarchar. I tried changing different data types but its showing the same kind of it.

Here is the BDC:

How To configure Asp.net Login name control with list column Data Field?



I am trying to access site username and insert that name into list

I am trying to configure asp.net login name control with list column but for that control not having any property to configure that with list column

Is there any solution to configure asp.net control with list column by using sharepoint designer 2010?



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)


Specifying the finder method for a business data connected list column's object picker.



I have a BDC xml file which specifies a finder and a specific finder method. These both work fine.

What I want to do is configure the application so that when connected to a list column the object picker uses my finder method rather than the specific finder method which it defaults to. Is this possible?

For further explination if you look at the following image http://i56.tinypic.com/2n22o3m.jpg

If I want to find the department using the objet picker I have to type the full identifier.

If I click the browse (address book icon) to popup the browse window I can then use my finder method. I want the initial object picker to use my find method and if there multiple matches be able to pick one using the popup you get when the message "No exact match was found." is displayed.

Hope this makes some sense!

Cheers Dave

How to merge two columns data into a third column (text fields) in a custom list? is it possible to



I am wokring with MOSS 2007 environment.

In one of the sites I have a custom list which has the following columns

1. Report Title - Hyperlink

2. Description - Multiple lines

3. Created date - date


The requirement is to merge the "Report Title and Description" and show it in a third column which will be inlcuded in the custom view.

Report Title                           Decsription                                                                Created date

XYZ                           Test Report which needs to be deployed                 01/01/2011


This needs

Picker returns nothing for BDC column in custom list


Playing with the BDC for the first time, running into some issues adding a Business Data column to a custom list.

I believe my ADF file is solid. I've been able to import that just fine and can use the application to drive various BDC-specific webparts (a Business Data List or Business Data Item, for example). It also seems to work when I manually enter information in my NewForm.aspx field and click the Check Names button (it verifies my entry and underlines it, creates link to profile when I view the list data).


If I try to use the picker, I get nothing. Enter a name I know is valid or a % and click the magnifying glass icon and I very briefly get the "Please Wait" message, then just an empty set with "Type into the search box above then press "Enter" to start your search" where my results should be.

Any pointers? Thanks.

Add Items to List with BDC Column via Web Services

I really hope this is possible.  I am trying to add items to a list that have a BDC column as one of the fields.  Here is the code I am using in the Batch

batchElement.InnerXml = "<Method ID='1' Cmd='New'>" +  
"<Field Name='Title'>Hello World</Field>" +  
"<Field Name='bdc'>BDCIdentifier</Field>&

DVWP not displaying a column as per the original list


I have a data view web part which displays a list column that allows multiple items to be selected from another list.  So in this column (in the actual list), the content in a particular cell is as follows:

6698; 1211; 3342; 1231; 1231

However, when I insert this field into the DVWP, the content above ends up losing all the spaces and so looks like this:


I am not sure why this is happening, and plus some of the entries in this column are made up of a very long string of numbers.  Even if I control the width of the column, this long list only ever gets displayed on one line (i.e. width restriction is ignored), therefore my page is being displayed very wide.  I think this is happening because of the lack of spaces in the string, but am not sure.

Does anyone know what is going on here?

Thanks for taking time to read.

How to read a column of a sharepoint list to a text string field of infopath form?

My infopath form used to read these email addresses from a web service and web.config file. Now i would like to get these user email addresses from a contact list in a sharepoint server. I am trying to do this without writing any codes. Here is what i have done so far: 1. Adding a new "data connection to receive data from SharePoint library or List" where i selected Email Address column of the contact list. 2. I added a new Text Field and define a new rule with "Query using a data connection" defined above. When i try to access the newly created Text field above it always return empty as if the Query attached to it did not executed at all. What did i do wrong? Is there a better way? Thank you in advance for your help.
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