- In form action event, attempt to set value to field contained in dictionary field will set the value to the dictionary field itself.
/// Example1
/* Variable */ /* Value */
dic:field_1 <- "foo"
/* Result
dic = "foo"
// Output to console.log shows that field "dic" is string, not object.
*/
/// Example2
dic:field_1 <- JSONParse({"foo":"bar"})
/* Result
dic:field_1 = undefined
dic:foo = "bar"
dic = {foo: "bar"}
// The parsed object {foo: "bar"} is assigned to the dictionary field "dic".
*/
- If dictionary field contains Array or Object property, the variable setting is disabled
in the workflow.
/* In form */
dic <- JSONParse({"field_1": "not change", "foo": {}})
/* In workflow or form */
dic:field_1 <- "change!"
/* Result
dic:field_1 = "not change"
dic:foo = {}
*/
As for problem 1, it seems to be a bug.
As for problem 2, I’m not sure if there is an internal error.
I think the documentation needs to be updated or fix feature.