In Deepser, you can define an inverse relationship with respect to the parent relationship.
This allows you to trace back from the entity related to the main one.
Taking as an example the report addressed in the previous point of this guide, using the Reverse Relationship it will be possible to connect from the user to all the Cis to which he has access.
Configuring an Opposite Relation
In this example, we will see how to configure the relationship seen in the previous point of this guide to be able to trace from the user to all the Location class ci to which it has access.
To do this, you will need to go to System -> Custom Fields.
Here we will have to choose the “DeepAdmin – User” template.
Now we will have to go to the “Fields” item, here we are going to click on “Add Field”.
At this point, the following screen will open:
We compile the fields as follows:
- “Column Name”: here we are going to define “cust_user_ci_relation”.
- “Column Type”: here we are going to define “Don’t Create DB Column”.
- “Element Type”: Here we will enter “Relationgrid”.
- “Label”: here we will enter “Authorized Locations”.
- “Status”: here we are going to define “Enabled”.
- “Relation”: here we are going to select the name of the relationship created previously.
As a last step, we must go to the “Extras” tab and configure the “Opposite” field on Yes.
At this point, We must click on the “Save” or “Apply” button to save the field.
Now it will be sufficient to add the field in the template form of the users, and we will be able to view and interact with the inverse relation.