Support Questions
Find answers, ask questions, and share your expertise

UpdateRecord won't update string array

Contributor

I have this entry in my schema:

 

        {
            "name": "a_string_array",
            "type": {
                "type": "array",
                "items": "string"
            }
        }

 

 

And I have added a property to UpdateRecord:

 

Property             Value
/a_string_array      "a string value"

 

 

I expected the output JSON to look something like this:

 

{
   .....,
   "a_string_array": ["a string value"]
}

 

 

But I get the following error:

 

Cannot convert value ["a string value"] of type class java.lang.String to Object Array for field a_string_array

 

 

I've tried making the Property name  "/a_string_array[*]" and "/a_string_array[0]", neither of which throw errors but the output is null.  I've also tried putting brackets around the Value but that doesn't work either.

 

UpdateRecord is a much cleaner solution than writing a whole ExecuteScript, I'd much rather use it if I can, but I'm just not understanding how this is supposed to work for arrays.  Help appreciated!

0 REPLIES 0