The Query objects defined in the directory abstraction layer let you predefine LDAP searches that you can then execute from a workflow form. The information in this section illustrates how you can define a query and use it in a form.
Suppose that you want to distribute calling cards to certain employees, but you only want to distribute calling cards to employees who work at home, and whose homes are located outside of the local office’s area code. You create a workflow form that allows the employee to:
Verify that they qualify to receive a card.
Submit a request for a card if they do qualify.
On your form, you allow users to enter the area code of their own local office and based on that area code, review a list of users that qualify for a card. The runtime form is shown in Figure 5-32.
Figure 5-32 Sample Calling Card Request Form
The data in the Candidates Picklist control is populated from the results of a query that is defined as shown in Figure 5-33.
Figure 5-33 Calling Card Queries Definition
The query takes a single input parameter, not start with the same value entered in the .
, for the user-entered area code. The query then searches the entity (in the idmsample-alh container) and returns the users whose telephone numbers doThe form has an input field called Figure 5-34.
. It is the text field where the user enters the area code of the local office. The properties for OfficeAreaCode are show inFigure 5-34 OfficeAreaCode Properties
Notice that the Text control defines an Figure 5-35.
event. The event fires when the user tabs from the Text control. The event fires the custom event as shown inFigure 5-35 OnChange Event Properties
The
event is defined as a property on the Picklist control.Figure 5-36 Candidates PickList Properties
When the event is fired, the Figure 5-37). This method populates the value of the PickList control with the results of the query called (defined in Figure 5-33). It passes the value of the text field as the query’s input parameter .
event performs an action expression that calls the method (as shown inFigure 5-37 GetCandidates Event