.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

sp v2 - possible to add a field to existing Lists by script?

Posted By:      Posted Date: September 17, 2010    Points: 0   Category :SharePoint
thousands of meeting workspaces in V2.0 only one doc lib in each, docs to be migrated to moss, without folders, so need to identify where it came from, am thinking add a column prior to migration, but don't know if possible. Alternately I could first migrate into moss, then add column, then migrate again, but very time consuming for that first step, even if it runs by itself. i am not a programmer, my appologies if this belongs elsewhere, but i'm hoping a developer may have some idea. Thank you, ps: migration to be done with DocAve or Metalogix, because cross-domain, and V2.0 had custom defs, so database upgrade not possible.

View Complete Post

More Related Resource Links

Create a task list from existing task lists based on field values


Hi!  I have a bunch (~10) of different task lists corresponding to different projects; each list has a mixture of Statuses, i.e., some completed, some In Progress, some Not Started.  I'd like to create a (preferably dynamically updated) single task list consisting of all the incomplete tasks from each of the project lists.  After much trial and error (I'm still a relative newbie with DB stuff; even more so w/ Sharepoint stuff) I figured out how to do this by viewing the lists in Access and creating a query which resulted in the compiled list I describe above; however, when I clicked on the "Publish" to Sharepoint button and returned to Sharepoint default view, I couldn't find this new list anywhere (e.g., the new, empty list I had created and changed to Access view, and from which I imported the other lists and created my query, was empty, and my list of task lists in the left side-bar didn't have my query-result-list).

How do I do what I want, w/ or w/out Access?  Thanks!


Combining data from 2 lists, then summing a field


I have 2 lists, one is a contact list (client, client title, address, etc.), the other is a list of meetings with these clients (client name, type of meeting, date, etc.).  The 2nd list has multiple entries for the same client.  I am trying to create a report that combines the data in these lists and displays them like this:

Client--Client Title--MeetingType1--MeetingType2




In addition to combining the list data, I also need to break up the Type of Meeting field and sum the number of different types of meetings for each client.  I added the 2 lists to a linked source, then inserted the data into a DVWP adding data from the 2nd list as a joined subview.


I tried this: xsl:value-of select="count(/dsQueryResponse/Rows/Row[@TypeOfMeeting = 'MeetingType1'])" but it just returns 0.  I'm not sure if that's the correct method though as I think it will return a count of ALL the rows, not the current row.  Any ideas would be appreciated!

Field CLR Types via Lists Web Service

I have an app that is retrieving list data via the Lists web service.  Currently, all data is returned as a string in a DataTable.  This works ok, but it doesn't work with the charting tool, which needs values of type int or float.  So I set the column types based on http://msdn.microsoft.com/en-us/library/ms131092.aspx and http://msdn.microsoft.com/en-us/library/ms437580(v=office.12).aspx.  For example, if the field type is Number, then I set the DataColumn type to Double.  But now, certain values cause exceptions because the returned value doesn't parse to the documented type.  For example, Lookup type fields are documented to be stored as int types, but the actual values returned are like "1;#". Does anyone have some advice about how to do this?  I have a big switch statement that checks the field type, and sets the DataColumn type according to the documentation, and I'm thinking of reducing it so that it only sets some of the types, for instance, Number and DateTime, but leaves the rest as string types.my blog - Tea Time with Meowkins

field from Lists web serice render pattern

When you pull list data from the Lists web service, is the value that it gives you based on one of the RenderPatterns in the field or field type definition?my blog - Tea Time with Meowkins

Update Managed Metadata Field with using Lists.asmx service

Hello! I am trying to update Managed Metadata Field with using Lists.asmx. I know that I must use this format WSSID;#VALUE|GUID. But I don't Know how I can get WSSID and VALUE Guid! Can I get them with using lists.asmx! Thanks!!

WSS Lists - Lookup field information missing in Excel 2010

Hi, I've got this xls workbook which contains a two-way synchronized SharePoint list. This WSS list contains columns which are related to other lists: for instance the list we're using is a list of assignments, where an assignment is related to an accounting period. Our server also has another list with all accounting periods. Both lists are related since the assignment list as an accounting period column of lookup type which uses the accounting period list as a source. In previous versions of Excel, the output is that the accounting period field is a combobox populated with all availalble accounting periods. Thanks to that, the user can easily link an assignment to an accounting period by selecting a value in this combobox and synchronizing. This works great with Excel 2003 and 2007, however in 2010 (same workbook, consuming the same lists) related information doesn't appear. The combobox is empty and as a consequence the user gets a data validation error since the value in the cell isn't among available values. Is there something special I should do to enable this feature in Excel 2010? Regards, Carl 

Lists - wrong field is nameing variable

I have created a list of applications which are installable via SCCM and the list is also used to raise new application packaging requests. What I am finding is that the workflow picks up the application developer as the name that is used in workflows, for example, if I raise a request for Microsoft Office Project 2010, the workflow comes back with "Please review Microsoft". How can I persuade the list and the workflow that it is the application name field I want brought back and not the company name? Regards Mark

Field level permissions on WSS 3.0 lists

I am using the Help Desk template, and need to lock it down a bit.  I would like to keep users from changing the Priority field on both the NewForm.aspx and EditForm.aspx pages.  I need my technicians to be able to edit the field, but would like it to either be hidden from the user, or have it displayed like the "Assigned To" field where it says " The control is not available because you do not have the correct permissions."   Someone suggested adding JavaScript to the pages in SharePoint Designer, but I do not know how I could wrap those fields in JavaScript so that it checks group membership.   Is what I am looking for too complex for SharePoint, or is there hope?   -Derek Brown Sr. System Engineer Vision One IT Consulting dbrown@v1corp.com

Issue Adding a new Lookup Field to an existing List Instance

I have a code base that houses all of the column, content types, template, and list instance definitions. Am using the Update functionlaity a lot from version to version. Has been working well to this point. I just added two new columns (fields), one a Lookup and the other a Multi-Lookup. The fields are added fine on the update, columns look correct and the content type to which these were added also look fine. I can create a new List instance from the content type, and the new lookup columns are fine. The problem is this. Any existing list instances that were created from this same content type, now blow up when I try and access list items via the SP GUI. Something about a valid GUID, I dont't have the exect error anymore, but will repost it when I recreate the issue for the tenth time. I tried deleting the new lookup fields from this new list instance, thinking that I might be able to re-add them to fix the problem, but I get a new stack trace when I try and re-add them. Any hints on where I can start digging would be appreciated. I think I'll start with comparing the list instance schemas between an existing list and a newly created one.  

Promote new field to existing forms


Using MOSS 2007 with InfoPath browser enabled forms.  Have about 600 existing forms.  I added a new field to the template and successfully promoted the field to the content type.   However, the field will not be added to the xml for existing forms until each form is opened and submitted.  But we have a workflow that will need to update this new field with a value once a certain date is reached.  The workflow will be unable to set the field on existing forms that have not yet been opened/submitted.  We want to avoid having to open/submit all forms each time we promote a new field.  Is there a programmatic way to handle this (injection of the field into the xml perhaps)?  Or is there a task in SharePoint that can be executed to do it? 

 Please help!!  Thank you!!

Designing lists: Quick key combination for adding a new list column field?


I'm simply looking for a way to quickly design lists, and I find it rather slow to use the mouse to go to the Add New Column button in the ribbon every time when I want to add a new list field.

The only column that can't be changed type of later seems to be the Calculated column. But for all others, you can still change them afterwards.

Update Existing Sharepoint List's field Problem



This is about sharepoint sequential workflow using visual studio.

I ve a prob to updating existing sharepoint list's field on the basis of other field(id or somthing else), using visual studio.

I m updating sharepoint list but its adding a new row below at last in the sharepoint list.

i m having a UserID(lots of user's ID) field in the sharepoint list, on the basis of this userID i ve to update a perticular field corresponding to UserID.

Please tel me wat type of code i ve to mension.


Thanks in advance !

Regards- Sharad

Adding a new field to a table via script in sql server management studio

I know how you can script to and create a new table but how about adding a new field to this table? For example: how would i add a new varchar(50) field named mynewfield?

USE [example]
/****** Object: Table [dbo].[Password]  Script Date: 10/26/2010 10:17:30 ******/
CREATE TABLE [dbo].[Password](
	[user_id] [int] NOT NULL,
	[password] [varchar](30) COLLATE SQL_Latin1_General_CP850_BIN2 NULL,
	[response1] [varchar](40) COLLATE SQL_Latin1_General_CP850_BIN2 NULL,
	[response2] [varchar](40) COLLATE SQL_Latin1_General_CP850_BIN2 NULL,
	[response3] [varchar](40) COLLATE SQL_Latin1_General_CP850_BIN2 NULL,
	[user_id] ASC

ALTER TABLE [dbo].[Password] WITH CHECK ADD CONSTRAINT [User_Password_FK1] FOREIGN KEY([user_id])
REFERENCES [dbo].[User] ([id])
ALTER TABLE [dbo].[Password] CHECK CONSTRAINT [User_Password_FK1]

How to set multiple value for a lookup field with powershell script?


I have a list that has a lookup column and can have multiple values.  I know how to set value to this field with powershell script. I need to know how to set multiple values to this field. 

Also, how can I create this field with powershell script?

Thanks and regards,


Can we add themes to Existing Lists in sharepoint2010?


Hi all,

In my home page i added an Existing List(Calendar). I changed that Webpart to dhow only current Events in that calendar. Now my question is, can we add theme for that particular Webpart in the home page, if possible how? or can we change the appearance of that list, how?

how to create an specific column and use it in many lists like "Title" field

In my sharepoint site I have lists that some fields are repeating in two list or more,to prevent of repeating I want to define one column or field and use it in any lists that I want, so I defined a column as an empty element and add it into my project,and in schema.xml file of my list .I add the

<FieldRef ID

how to create an specific column and use it in many lists like "Title" field

In my sharepoint2010 site I have lists that some fields are repeating in two list or more,to prevent of repeating I want to define one column or field and use it in any lists that I want, so I defined a column as an empty element and add it into my project,and in schema.xml file of my list .I add the

<FieldRef ID

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