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 6-33.
Figure 6-33 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 6-34.
Figure 6-34 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 do
The form has an input field called Figure 6-35.. It is the text field where the user enters the area code of the local office. The properties for OfficeAreaCode are show in
Figure 6-35 OfficeAreaCode Properties
Notice that the Text control defines an Figure 6-36.event. The event fires when the user tabs from the Text control. The event fires the custom event as shown in
Figure 6-36 OnChange Event Properties
Theevent is defined as a property on the Picklist control.
Figure 6-37 Candidates PickList Properties
When the event is fired, the Figure 6-38). This method populates the value of the PickList control with the results of the query called (defined in Figure 6-34). 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 in
Figure 6-38 GetCandidates Event