1

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?

1 Answer 1

1

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.

2
  • Thanks! One should always check URLs with SharePoint... There is always sth interesting there :)
    – MkL
    Commented Jul 4, 2011 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
    Commented Jul 4, 2011 at 17:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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