json-schema-form icon indicating copy to clipboard operation
json-schema-form copied to clipboard

should have the ability to access environment / session variables in compute expressions

Open aeberhart opened this issue 4 years ago • 1 comments

We currently evaluate computed expressions are follows:

this.value[field] = jsonata(expression).evaluate(this.value);

where the expression (from the schema def) is applied on the object. However, a typical case is to write the current user in a "lastChangedBy" field. This is not possible at the moment.

We could introduce a $context() jsonata function and provide the parent component the ability to provide a context object.

aeberhart avatar Aug 12 '21 13:08 aeberhart