Softerra LDAP Administrator HelpShow AllHide All

Attribute Value References

Attribute value references are helpful, if you need some attributes to include values of other attributes when creating or modifying entries. You can use value references when creating LDAP entries based on entry templates or when modifying them with the help of the Add or Modify Attribute and Multiple Modifications wizards.

Modify Several Entries

Value references can be very useful when you need to update several LDAP entries in batch. For example, you may want the 'mail' attribute of some users to contain the user UID and a constant domain name. Since the attribute values will be different for each user you won't be able to perform such operations without special means. This is the situation when value references can help you.

To perform such a multiple modification, you need to specify the following value for the 'mail' attribute: %uid%@company.com, where %uid% is a reference to the 'uid' attribute. Before setting the value to a user entry, LDAP Administrator will substitute %uid% with the real value of the uid attribute creating unique values for each user entry.

Using value references in the Add or Modify Attribute wizard

  1. Select user entries, in which you'd like to update the 'mail' attribute.

  2. Click Add/Modify Attribute in the context menu to launch the Add or Modify Attribute wizard.

  3. Choose 'mail' attribute from the list and click Next, or just double-click the attribute.

  4. Click the button embedded in the Attribute Value edit box.

  5. Choose 'uid' attribute from the list and click OK, or just double-click the attribute.

  6. Type '@company.com' in the Attribute Value edit box and click Finish.

Using value references in the Multiple Modifications wizard

  1. Select user entries, in which you'd like to update the 'mail' attribute.

  2. Click Multiple Modifications in the context menu to launch the Multiple Modifications wizard.

  3. Click the Add button and choose Add/Modify Attribute modification type.

  4. Choose 'mail' attribute from the list and click Next, or just double-click the attribute.

  5. Click the button embedded in the Attribute Value edit box.

  6. Choose 'uid' attribute from the list and click OK, or just double-click the attribute.

  7. Type '@company.com' in the Attribute Value edit box and click Finish.

  8. Click Finish button.

Create Entries from Templates

Very often you need to create LDAP entries of a similar kind that contain resembling set of attributes. To avoid specifying same values every time when you need to create an LDAP entry of the kind, you can use entry templates containing predefined values. Some of the template attribute values may depend on other which means that they should be generated on the fly after the values they depend on are specified. This can be achieved with the help of values references.

For example, when creating user entries, the 'cn' attribute often consists of the user first and last names. In order to avoid specifying the names several times you may set the following value of the 'cn' attribute in a template: %givenName% %sn%, where %givenName% and %sn% are references to the 'givenName' and 'sn' attributes. The references will be substituted with the user specified values when creating entries basing on the template, thus generating the 'cn' attribute automatically.

Using value references in entry templates

  1. Select an entry, on which a new template must be based.

  2. Click New Entry Template on the Entry toolbar or select the same command from the New section of the context menu to launch the Entry Template wizard.

  3. At Step 1 of the Entry Template wizard, specify the name for the template.

  4. At Step 2 of the Entry Template wizard, type '%givenName% %cn%' for the value of the 'cn' attribute. You can also click embedded button to use the Insert Value Reference wizard.

  5. Click Finish button.

Specifying Value References

A value reference is a pattern of text that contains the name of the attribute it refers to and some formatting options. You can insert a value reference either by entering it manually (using the format described below) or with the help of the Insert Value Reference wizard. When it is possible to use value references, edit boxes will contain the embedded button to launch the wizard.

Using the Insert Value Reference wizard

The Attribute Value Template Wizard allows you to insert or edit value references: 

  1. Choose the name of an attribute, a value of which you would like to insert, from the list. This list contains attributes eligible for the current entry as defined by the LDAP schema.

  2. Check the Include only first check box if you need the value inserted not to exceed the specified length. If the length of the value being inserted is greater, it will be truncated.

  3. If you don't want the length of the value inserted to be less than the specified length, you can enter a padding character to fill the value up. To do this, check the If the value is shorter, add following character to the end check box and type a character.

Value references have the following format:

where:

See Also