I have an optional (not-required) Lookup column (Response) in my SharePoint List (Feedback). I am trying to use pnp js to reset the field to nothing.
const response = await this.list.items.getById(change.object.id).update({ResponseId: 0});
Looks like it works in the webview sharepoint. When getting the items, it returns a "bad" lookup with ID=0 and all other fields undefined. Same if I try using -1.
If the field is actually empty, it doesn't return the field at all. How can achieve the same using pnp? E.g. to clear the look up.
Any helps is much appreciated, Dennis
@Dennis Kuhn,
Can you please set it null like below?
const i = await list.items.getById(3).update({
Title: "My New Title",
ResponseId: null
});
It works well on my SPO list, Could you please have a try?
BR