Skip to content

[Dynamic Form] It will throw "a 'PrimitiveValue' or 'StartObject' node was expected" error when clean up a multiple lookup field #1961

Open
@wuxiaojun514

Description

@wuxiaojun514

Category

[ ] Enhancement

[x] Bug

[ ] Question

Version

Please specify what version of the library you are using: [ 3.20 ]

Expected / Desired Behavior / Question

Observed Behavior

It will throw error when you clean up a LookupMulti field and save it in Dynamic Form.

Error making HttpClient request in queryable [400] ::> {"odata.error":{"code":"-1, Microsoft.SharePoint.Client.InvalidClientQueryException","message":{"lang":"en-US","value":"An unexpected 'PrimitiveValue' node was found when reading from the JSON reader. A 'StartArray' node was expected."}}}

Image

I think we should use [] instead of null when save it in rest api
Image

Steps to Reproduce

  1. Make sure your list has a multiple lookup field and create an item which has value on this multiple lookup field.
  2. Create a form customization spfx solution with Dynamic Form control
  3. Edit the item with Dynamic Form and delete the value on multiple lookup field
  4. Click save button in the form, then you will get the exception.

This problem is similar as #1578 .
It should work if we change the null to [] . I can find sometime to fix it.

Image

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions