Creating reference property
A reference property is a property that is used for creating a reference to one or more data object, for example, a data object for a change request may include a reference property called Requestor through which a reference can be created to a data object containing users.
In the Reference Property dialog box, you define how the referenced information will be displayed to the user. Then you define your lookup view. This is done by referencing a data object type and selecting the fields to be displayed in the Lookup view.
Make sure that the data object type you want to reference is available.
In the General section of the Reference Property dialog box:
-
In the Name field, type the name of the property.
-
In the Description field, type a description of the property.
-
Select the control type from the Control type dropdown list:
- Lookup (single value) - if it should only be possible to look up one value
- Lookup (multiple values) - if it should be possible to look up more than one value
- Lookup (table with multiple values) - if you want to add attributes to the reference property
-
In the Lookup view field, select how you want the information to be displayed on the form: List or Custom.
If you select Custom lookup view, the Lookup URL field becomes available. Now you can define a custom lookup view by entering a URL or a JavaScript function that returns a URL (the JavaScript function must start with @)
- Click Apply, to make the toolbar available.
Next, you can define the type of information that will be displayed to the user when clicking the dropdown list in the look-up view on the form.
Editing lookup view for a reference property
The Edit Lookup view option on the toolbar of the Reference Property dialog box allows you to define the look-up view for your form. This is done in the Data Object View Definition dialog box.
-
Click Edit lookup view to open the Data Object List View dialog box.
-
In the Data object type filter field, add the data object type you want to reference.
-
In the Displayed fields field, click Add to select the properties you wish to be displayed in your reference list. Remove any default properties you do not want and arrange the properties in the correct order.
-
Advanced options allow you to add and/or edit the Access modifier for the lookup view and select to display the Add new data object icon in the reference property selection popup by selecting the Toolbar buttons checkbox.
-
The Lookup view created for a reference property is numbered according to the views sequence but does not appear in the views list. You must edit the Lookup view through the property.
Dynamic filtering in lookup views
Dynamic filtering is designed to improve usability of the Omada Identity user interface and should not be used as a substitute of proper access management. It is possible to dynamically filter the filter expressions for reference property lookup views to give more flexibility in limiting the results of the lookup.
You can employ this feature thanks to two elements, each of which can be used separately.
Filter expressions of data object views
For dynamic filtering, use the Value(s) of the active user checkbox in the Filter expressions dialog box. This checkbox allows you to include/exclude an active user, active user's identity, or any other object referenced by a user data object type. For example, you can exclude an active user from the list of users when selecting an owner. Owner is represented by the OWNERREF reference property based in the User data object type. To do so:
-
Go to Setup > Administration > Data Management > Properties > OWNERREF.
-
Click Edit lookup view.
-
Click Expressions.
-
Click New to open new filter expression dialog.
-
In the Left side field select
ID [Fixed field]
. -
In the Inner operator field select not in.
-
In the Right side section check Value(s) of the active user.
Consequently, if the signed-in users are selecting owners, their user identities will not show up on the list.
You can also limit the list of identities to active users' identities only when making new employment. Identity is represented by the IDENTITYREF
property in the Employment data object type. To do so:
-
Go to Setup > Administration > Data Management > Properties > IDENTITYREF.
-
Click Edit lookup view.
-
Click Expressions.
-
Click New to open new filter expression dialog.
-
In the Left side field select
ID [Fixed field]
. -
In the Inner operator field select in.
-
In the Right side section check Value(s) of the active user.
-
In the Reference path field type
IDENTITYREF
. This is a backward reference path that we can use here because the User data object type has a reference to Identity through theIDENTITYREF
property.
Consequently, if the signed-in users are selecting owners, their user identities will not show up on the list.
It is also possible to define a reference path expressions that resolve from the active user. This possibility allows you to create more complex expressions that cannot be defined with the use of the Value(s) of the active user checkbox. Such an expression must begin with $ActiveUser
prefix and end with a reference property, for example: $ActiveUser/IDENTITYREF
.
Filter expressions in Form fields
It is also possible to add form specific filter expressions when performing a reference property lookup. These form specific filter expressions are applied on top of the already defined filter expressions for a given property. To do so, follow these steps:
-
Go to: Setup > Administration > User interface > Forms.
-
Find Type form: Employment and open it.
-
Click Design form.
-
Click the Identity field.
-
Click Expressions to edit form field filter expressions.
- Click the Edit lookup view if you want to edit filter expressions for reference property behind the field.
-
Click New.
-
In the Left side field select
Organizational unit [OUREF]
. -
In the Right side (expression) field type
$FORM_OUREF
.$FORM_OUREF
denotes a form field
In consequence, when you create new employment and fill in the Organizational unit, only relevant identities will be displayed in the Identity lookup view.
Except for standard expressions, form field filter expressions can define expressions that reference a form field value, for example, when creating new employment in the Identity lookup view, you can display only the identities from the currently selected Organizational unit.
Remember that if the field behind form expression is mandatory on the form, you must fill it before opening a lookup view.
If the field behind form expression is not mandatory and has no value, the expression will be ignored. If a field A depends on another field (B), and that field B is cleared or changed, the dependent field A is also cleared.
Working with attributes for a reference property
Attributes are used for adding details to a reference property with the Control type Lookup (multiple values). If you want to add, delete or arrange attributes for a reference property:
-
Open Property list view.
-
Select Attributes to work with attributes in the Attributes list view.
-
Add, remove, and change the order of the attributes.