Creating a Default Value for a Relationship Attribute - WorkView - Foundation 24.1 - Foundation 24.1 - Ready - OnBase - Premier - external - Premier

WorkView

Platform
OnBase
Product
WorkView
Release
Foundation 24.1
License
Premier

Relationship attributes can be configured to contain default values that must be matched to both the logged in user and an attribute value in the related object. In this instance, both the logged in user name and related attribute value must match. For example, an employee, named Jane Harper, is logged in. When Jane Harper is logged in, the administrator wants the EmployeeInformation object with the EmployeeName attribute value of “Jane Harper” to automatically be related to any CustomerIssue object Jane Harper creates. If configured to do so, when a new object is created, one of its fields will be populated with a value from an object associated with the currently logged in user. This is useful when you want the user logged in to be automatically associated with an object.

The special configuration steps consist of configuring class attributes and configuring views to display appropriate attribute values.

To create attributes that will relate to one another using the logged in user:

  1. Create two classes or use two existing classes. For example, EmployeeInformation and CustomerIssue.
  2. In the class containing the information to be related (EmployeeInformation), create an attribute that identifies the object (EmployeeName). Ensure that this attribute is Alphanumeric with a length that accommodates the longest user name in the system.
  3. Click Save.
  4. In the class (CustomerIssue) to be related to the class described in step 2 (EmployeeInformation), create an attribute that is of the Relationship data type. The attribute's name does not have to be identical to the attribute to be used for the relationship. In our example, the name of this attribute will be Employee.
  5. Select the appropriate class from the Related class: drop-down list. In our example EmployeeInformation would be selected.
  6. Select the Logged-in user name option. %U displays in the Default value: field.
  7. Enter [name of attribute] corresponding with the attribute that should be used to link the two class objects together after the %U. In our example, the field would contain: %U[EmployeeName].
  8. Click Save.
  9. Click Save again.

    To configure a view to display the correctly related attribute values:

  10. In a view of the class containing the information to be linked (EmployeeInformation), ensure that the attribute that will be used in the relationship field is inserted (EmployeeName).
  11. In the view of the class to be related, insert a field for the related attribute. In our example, a field would be inserted for the EmployeeName attribute within the related class.

For more information about configuring views, see WorkView Designer.

In order for a value to populate the related attribute field in the WorkView client, an object with a value equal to the currently logged in user must exist. If no object meeting this requirement exists, the field will not be automatically populated.

CAUTION: Default values for relationship attributes may have an impact on performance as each value needs to be looked up in the related class. For standard classes, the lookup is fast and may not be noticeable. If the relationship is to an external class, especially one that uses third party services to retrieve data (scripted classes, web service based classes or LOB Broker Classes), object creation can take noticeably longer.