1

I am trying to create a bulk upload for sharepoint site

It has some content types

For example, for contenttype Document, I am sending the values in the below fomat

{FieldId:"Some_Id",FieldType:"Text",FieldValue:"Value"}

This format works when the FieldType is Text (for column type single line of text)

But for other column types I am not able to figure out the FieldType that I need to send

I tried DateTime for column type Publishing Schedule Start Date and Choice for Choice

After doing some research i found that for field type of Yes/No in sharepoint the dataType is booleanand for DateTime it is Date And Time similarly where can i find the list of datatypes for all the field types(multiple line of text, user groups, Meta data etc)

1

Depending on the field type, you may not be just able to set the field value like you do it with simple text field type. E.g., with multi-choice fields you would do it like this:

$choicevalues = New-Object Microsoft.SharePoint.SPFieldMultiChoiceValue;
$choicevalues.Add("Green");            
$choicevalues.Add("Blue");            
$i["multiplechoicefield"] = $l.Fields["multiplechoicefield"].ParseAndSetValue($i,$choicevalues);            
$i["multiplechoicefield"].ToString();            
$i["multiplechoicefield"] = $choicevalues;            
$i.Update(); 

I'm not going to copy&paste this LONG article here, but I believe it will tell you how to set values of different field types. It uses PowerShell, but regardless of how you're doing it, it should still give the idea for each field type.

  • Thanks @palo Where can i find the list of dataTypes available in sharepoint? For instance, dataType of Yes/No field is Boolean(pls refer to my updated question) – Vignesh Subramanian Apr 23 '15 at 10:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.