Reference a property outside of the array

Hi @luiz290788,

I’ve found this thread, the comment says it is a limitation. But this was more than 2 years ago. Is there any update on that issue? @sdirix

Conceptually there were no changes here. We still only hand over the data which is scoped to the respective array/object, therefore you can’t use any outside references.

Could we replace the pointer implementation with a library like this that supports relative json pointers? I think it could solve the problem.

The concrete problem here is not the pointer implementation. Conceptually we only hand in the local data of the object/array so no matter what the pointer is, it can’t resolve to “outside” data. As we use the same AJV instance throughout JSON Forms you could even today construct an outside pointer via id based $refs. They just have no meaning as the corresponding data is not looked at.

Just out of curiosity, but why do we reference the schema in the condition scope? Could we reference the data directly?

JSON Schema $ref and Ui Schema scopes are on the same level of abstraction, so for consistency it makes sense to use the same kind of pointer for the rule condition scope. Using a data level pointer would not really help here as discussed above because the outside data is not used anyway.


To support this generically we would need an extension of the rules, for example to allow to define a rootCondition or parentCondition which would then be executed in that context.

If you need this support right now you can easily add such a condition in your UI Schema. It will be ignored by the off-the-shelf renderer sets, so you could add support for your custom renderers to also check these customized conditions.