2. Right-click in the Form Design window
and select Table
from the Select form field type list.
3. Select Generic
table in the Configure
form field window.
4. Click the Configure... button.
5. Click the Configure... button. The dialog box Setup
generic table will appear.
6. Select the option LDAP query.
Several additional tabs will now become available in the Setup generic table
dialog box: LDAP binding, LDAP
filter, Attributes, Options, Variable and Run
test.
7. Select the LDAP
binding tab and choose the Global
catalog binding. This will be
the data source for your LDAP query.
8. Click the LDAP filtertab
and select the predefined option All
users from the list Example LDAP search filters.
Then click the Insert button. This will insert the LDAP search
string in the LDAP search filter window. To list all users, the LDAP search
string becomes (objectClass=user)
9. Select the Attributes tab and select the predefined attribute
Users - full details from the Default
attribute settings list.. Then
click the Set
button to make this selection the default attribute setting and click
Apply.
10. Click the Run
test tab (for this example we
will ignore the Options and Variable tabs and continue to the Run
test tab to check if the filter
returns the desired result). The resullt should be similar to the following
screen:
Example 2: Creating a wildcard search
for a user
In the following example we will
create a form in which we ask the user to enter part of the user name.
The first part will ask the user to enter part of the user name to search
for, the second part will return a table listing all the users who meet
the search criteria.
1. Create a new UMRA form with the
name "List Users".
2. Right-click in the Form Design window
and select Static text field from the Select
form field type list.
3. Enter the text "Please enter
the first three letters of the user:" in the text field and click
OK.
4. Right-click in the Form Design window
and select Input text field from the Select
form field type list.
5. Enter "%User_Partname%"
in the variable field. The user input will be stored in this variable.
Click OK.
6. Right-click in the Form Design window
and select Button from the Select
form field type list. Type in
"Search now" as the displayed text for this button and change
the fixed width to 100 pixels.
7. Click the Manage
actions... button and add the
actions "Check the input fields of the submitted form" and "Return
the form of project "List Users". Click OK twice to return to
the design window.
8. Right-click in the Form Design window
and select Table
from the Select form field type list.
9. Select Generic
table in the Configure
form field window.
10. Click the Configure... button.
11. Click the Configure... button. The dialog box Setup
generic table will appear.
12. Select the option LDAP query.
13. Click the LDAP filtertab
and select the predefined option All
entries with the string 'Bert' somewhere in the name
from the list Example LDAP search
filters. Then click the Insert
button.
14. In the LDAP search filter window,
replace *bert* with the variable *%User_Partname%* and click the Apply
button.
15. Select the Attributes tab and select the predefined attribute
Users - general information from the Default
attribute settings list.. Then
click the Set
button to make this selection the default attribute setting and click
Apply.
16. Click OK twice to return to the
Form Design window.
17. Finally, you need to set the
security for this form. Right-click in the Form
Design window and select the
Form properties command.
In the Configure form properties dialog box which appears, click the Security
tab.
18. Add the user who is authorized
to execute this form. In the example shown above, this is the Administrator
account for the domain T4EDOC.
19. Save the form.
20. Right-click in the Form Design
window and choose the command Toggle
Auto preview to see the runtime
version of your form.
21. Type in the first three letters
of the user name you want to search for, as shown in the screenshot below.
22. Press the Search
now button to retrieve all the
matching user names. In our example, only one user name meets the search
criteria.
Example 3: Showing a list of users
who have not used their account since it was created
1. Create a new UMRA form.
2. Right-click in the Form Design window
and select Table
from the Select form field type list.
3. Select Generic
table in the Configure
form field window.
4. Click Configure.. twice and select LDAP query as your table
type.
5. Select the LDAP
binding tab and choose the option
Active Directory Root.
Note:
To retrieve all users who have not logged in since their account was created,
we need to use the attribute lastLogon in our search filter. By default,
this property is not included in the Global Catalog. If you wish to change
this, you can add this attribute to the Global Catalog using the Active
Directory Schema snap-in. Please refer to the Microsoft Help for more
information on this topic.
6. Select the LDAP
filter tab and enter the string
"(&(objectClass=user)(lastLogon=0)"
7. Select the Attributes tab and select the predefined attribute
Users - general information from the Default
attribute settings list.. Then
click the Set
button to make this selection the default attribute setting and click
Apply.
8. Select the Run
test tab to test your LDAP query.