Softerra LDAP Administrator Help | Show All |
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.
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.
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.
Value references have the following format:
where:
% - special symbols, indicating the beginning and the end of a value reference
attributename - the name of an attribute a value of which you would like to insert
[] - means optional
lower|upper - case of the inserted value
count - maximum length of the inserted value
char - a padding character, fill up the inserted value, if its length is less than 'count'