yuuvis® RAD Q&A

0 votes
by (310 points)

Greetings,

I couldnt accomplish what i tried to do with the structure service.

There is a folder in which there are objects named "vorgang". It is possible to generate a tree that has a node for each "vorgang" contained in the folder itself.

What would be advantageuos for us would be to have the option to have all objects underneath (aggregated by type) that reference that object.
"vorgang" itself is not a contextfolder.

Is that possible? The reference seems to be anchored on the current folder. Also the placeholder #TARGETID# is meant to be the folder id. Is there another placeholder to hav other IDs for this check?

As an example:

|-[-] Aktenzeichen
| |
| |-[-] offen
| | |
| | |-[-] vorgang1
| | | |
| | | |-O type1 that references vorgang1
| | | |
| | | |-O type2 that references vorgang1
| | | |
| | | |-O type3 that references vorgang1

In addition to that the objects referencing could reside in different folders, would that be possible at all for them to be shown?

Thanks
Vadim

1 Answer

+2 votes
by (3.3k points)
edited by
 
Best answer

Hello,
the object tree "contains" only children of the current context folder or more precise: The result amout is filtered on all objects that are children of the context folder with the ID equals #CONTEXTID#. It is not possible to show objects outside of the context folder.
In comparison the reference tree. This tree is filtering on all objects that have references on the target folder with the ID #TARGETID#. #TARGETID# and #CONTEXTID# are identical in value - but different in logical use. The #TARGETID# is used as reference target. The #CONTEXTID# is the parent or context folder id.
In both cases the tree is build by one single aggregation query that builds the complete tree. It is not possible to mix in objects outside the input amout - outside the folder children in the object tree or outside the amount if refrencing objects in the reference tree.
But you can achive to put individual objects (Vorgang) inside the tree, by doing a aggregation on a field, that is unique for each object. Always available is the unique ID field.

Example :

[ ..., {

    "title": "Vorgänge",
    "key": "AllVorgang",
    "field": "id",
    "size": 10000
  }, ... ]

Maybe this solution is matching your requirements, because the elements referencing the "Vorgang" are visible in the reference tab of the object view, if a vorgang is selected.
br

...