Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 

Attribute Filter Script Examples

 

Example 1: Using an LDAP Query to Select a Static Filter to Execute

Example 1: Using an LDAP Query to Select a Static Filter to Execute

This example uses the same LDAP repository as Example 4: Conditional Profile Assignment from User Attribute. In this case, the value of the Employee-Type attribute is used to select the name of a statically-defined filter that is returned as the result from the script. If an unknown Employee-Type is returned, no static filter is executed, but the script modifies the Service-Type attribute programmatically.

Here is the LDAP accessor .gen file:

Here is the .jsi file for an outbound filter script:

Example 2: Adding Values to Multi-Valued Attributes

Example 2: Adding Values to Multi-Valued Attributes

This example demonstrates the difference between adding values to orderable and non-orderable multi-valued attributes. The script is configured as an inbound filter. A profile is created to assign three unique Reply-Message and three unique Filter-Id attribute value strings to the response attribute list. Subsequently, the script adds four new values to each attribute, two of them unique and two of them duplicates. All attribute values are printed to the server log before and after the new values are added. Because the Reply-Message attribute is orderable, the new values are concatenated to the value list and the duplicates are preserved. Because the Filter-Id attribute is non-orderable, the new attributes are merged to the list and the duplicates do not appear in the final list.