Filtering "Member Role" Attribute by a custom procedure

See also: https://heuristicsolutions.atlassian.net/wiki/spaces/DOCS/pages/1887568053 / LB-2026

Overview

The “Member Role” attribute, by default, will allow users to select any Member Role that matches the Role and Status values specified in the attribute configuration.

In some cases, additional business rules may be desired. For instance, when allowing a Provider to select an Instructor for a Course, you may want to only allow Instructors that will still have an active license at the end of the course availability period.

This sort of logic is too complex and nuanced to be configured through the visual editor, but it can be implemented using a custom database procedure.

System Administrator configuration

First, a SysAdmin must create a new Custom Database Object of type MemberRoleAttributeFilterDataSource. A sample procedure exists and can be used as a starting point.

This procedure should apply whatever custom business rules are desired and return only the selectable Member Role data.

Administrator configuration

Once the custom procedure is created, edit the “Member Role” attribute definition.

In the “Filter By” setting, choose the custom procedure.