Search code examples
sharepointsharepoint-2013sharepoint-listpnp-js

PnPJS update items - List data validation failed


We loaded a SP list directly from an Access query and now when we try to run a list update with pnpjs I get an "Error code: -2130575163.List data validation failed" .

There are no required fields, no validation on any columns, and no Validation settings on the list. Is this not working because it was uploaded from Access?

Updating it similar to this:

const items = await sp.web.lists.getByTitle("MyList").items.top(1).filter("Title eq 'A Title'").get();

const updatedItem = await sp.web.lists.getByTitle("MyList").items.getById(items[0].Id).update({
    my_id: mynewID,
})

Adding list items works with no issues. Updating a list item does not work.


Solution

  • I did resolve it - when you use the StrReverse function in Access and then upload that query to a SP list - the list type is corrupted. To fix it I simply went in and changed the type from single line text to multiline - then back to single line of text.

    I was then able to update the list item.