Restrict the value range for references

For object class properties of the type Reference or Reference Array the Type Info attribute of the object class property in the class model defines which object classes can be the reference target.

In Alfabet Expand, you can view the setting in the Meta-Model tab. Expand Classes > the relevant object class > Properties and click the relevant object class property. You can see the Type Info attribute setting in the attribute window. The Type Info attribute is not editable in the standard object class model.

You can further restrict the specified reference targets with one of the following methods:

If you define both restrictions for an object class property, the user can only select objects to which both rules apply.

If you define a range restriction for an object class property already in use, already available settings not matching the restriction will persist in the database until a user manually changes them to an allowed value.

If the Back Reference attribute of the object class property establishing a reference shows the name of an attribute of the target object class, the target object class also stores the reference in the defined object class property. For example, if an application is assigned to an application group, this is stored both in the object class property Applications of the application group and the object class property ApplicationGroups of the application. If you restrict the range of the reference, you need to configure the target object class as well. For example, if you limit the Applications object class property of the object class ApplicationGroup to applications of one of five application stereotypes only, you must hide the object class property ApplicationGroup from the other four object class stereotypes of the object class Application.

  1. Go to the Presentation tab.
  2. In the explorer, expand the nodes Class Settings > the object class (stereotype) you would like to edit > the class settings you would like to edit.
  3. Right-click the Properties node and select Modify Property Behavior.
  4. The new property modification will be added as the last child node of the Properties node with a random property assignment. Click the node and select the relevant object class property in the Property Name attribute.

    Each object class property can only be added once to the Properties node. If you do not find the object class property in the drop-down list, there will be already a modification for this property. Change the existing property modification node.

  5. Set the Access in User Interface attribute to WriteAccess.
  6. Open the editor of the Value Range Definition > Limit to Classes or Stereotypes attribute, select the checkmark of all object classes or object class stereotypes that you want to allow as reference target and click OK.
  7. Optionally, change the caption, hint and availability on the user interface for the object class property to match your reference target selection.

If the Back Reference attribute of the object class property establishing a reference shows the name of an attribute of the target object class, the target object class also stores the reference in the defined object class property. For example, if an application is assigned to an application group, this is stored both in the object class property Applications of the application group and the object class property ApplicationGroups of the application. If you restrict the range of the reference, you need to configure the target object class as well. For example, if you limit the Applications object class property of the ApplicationGroup object class to a defined range of applications only, you should hide the object class property ApplicationGroup for the Application object class.

The restrictions will only be applied to data workbenches, property groups in data workbenches, and guided data entry views. If you have migrated from an Alfabet 10.15.x release, you need to additionally configure the restriction in your editors and wizards with the methods valid for editors and wizards.

There are two ways to define the range. you can either define a range valid for all objects or define ranges depending on the current setting of objects. For example, if you know that mail servers are only set up in a few different locations of your company, you can restrict the location assignment for devices with the Server Type set to Mail Server to the locations providing mail servers.