Skip to content

Stripping

The name code instances mentioned above can be manipulated as described below before they are stored in the WorkZone database.

You can strip a defined leading and/or trailing part of a string of the data from AD. To do this, use one of the following XML elements in the SJADConfiguration<database name>.xml configuration file:

  • leading: <stripPrefix>
  • trailing: <stripPostfix>

The XML element must be entered as a sub-element of the <domain> element to facilitate the possibility of different name code stripping for alternate domains.

Only name codes with the defined part of the string are stripped; all others are left unchanged. You can only strip one prefix and one postfix for each kind.

Both elements have an optional attribute called kind. The legal values of the attribute are:

  • user – User codes will be stripped.
  • unit – The unit codes (OUs in AD) will be stripped.
  • group – Group access codes will be stripped.
  • committee - Committee codes will be stripped.

The part of the string you wish to strip should always be written in CAPITAL LETTERS since they are name codes.

<stripPrefix>T-</stripPrefix>

This stripping string will result in all user codes from the relevant domain beginning with T- will be stripped of these; all others will be left as they are:

AD code WZCS code
T-VIGGO VIGGO
HUGO HUGO
<stripPrefix kind=”user”>T-</stripPrefix>
<stripPostfix>O</stripPostfix>

This stripping string will result in all user codes from the relevant domain beginning with T- and ending in O will be stripped of these if they meet the criteria.

AD code WZCS code
T-VIGGO VIGG
HUGO HUG
<stripPrefix kind=”unit”>OU-</stripPrefix>
<stripPostfix kind=”unit”>Z-</stripPostfix>

This stripping string will result in all OU codes from the relevant domain beginning with OU- and ending in -Z will be stripped of these if they meet the criteria.

AD code WZCS code
OU-DEP1 DEP1
OUDEP2-Z OUDEPD2