Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I successfully add items to one list with boolean column when checking for some other question but when it came to my "production" list, it permanently returns error as in the title. This is the Batch:

<?xml version="1.0"?>
<Batch xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" OnError="Return">
<Method ID="1" Cmd="New">
<Field Name="ID">New</Field>
<Field Name="Timestamp">20110704_1545</Field>
<Field Name="Result OK">0</Field>
</Method>
</Batch>

When I drop the boolean column from Batch, everything is fine, item is added with boolean column set to default value. So on the SharePoint side everything looks fine (not the problem with "field types not installed"... This Batch works:

<?xml version="1.0"?>
<Batch xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" OnError="Return">
<Method ID="1" Cmd="New">
<Field Name="ID">New</Field>
<Field Name="Timestamp">20110704_1545</Field>
</Method>
</Batch>

I've checked again all possible value for True and False (TRUE/FALSE, True/False, 0/1), even changed field name not to include space.

Any ideas?

share|improve this question
add comment

1 Answer 1

up vote 1 down vote accepted

Field names used in the XML are the field Internal Names. They cannot have spaces.

If you created a field called "Result OK", then I can bet the internal name is "Result_x0020_OK".

Here's a blog post on how to get the internal name of a field in SharePoint.

share|improve this answer
    
Thanks! One should always check URLs with SharePoint... There is always sth interesting there :) –  MkL Jul 4 '11 at 17:44
    
Indeed! There's also too many things to just "know" in SharePoint - it has that many quirks, but this is a common one! –  James Love Jul 4 '11 at 17:48
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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