Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help ! SpField problem!

Status
Not open for further replies.

zire22

Programmer
Apr 24, 2007
1
BA
Hi ! I have a little problem with SPField in wss 3.0 I need to create a copy of one item in my list and added the original items fields values to new one (newitem)


I try this:

spNewListItem["Projekat"] = spListItem["Projekat"];

and this works fine ,!?"!" But

problem is that the name of the field can be something else so I was trying :

foreach(SPField f in list.ParentList.Fields)
{
spNewListItem[f.Titel]=spListItem[f.Title];


}

and this is not working !!!!!!!!!

so my question is "HOW TO ASSIGN FIELD VALUEFROM ONE ITEM TO NEW ITEM !!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top