I found the below three rules to use to turn my multi-valued eDirectory
attributes into a concatenated string in Active DIrectory (so that all the
values are displayed in AD). I use it for the description attribute and
the telephoneNumber attribute (I just replace the key attributes in the
rules). They both work great!

I tried to use these same rules for the facsimilieTelephoneNumber, and it
works BUT....it adds a 0 to the end of each fax number (thus distorting
the real number). So what you see is:
(512) 888-88880, (512) 777-77770

Instead of what you are supposed to see:
(512) 888-8888, (512) 777-7777

I believe this is because of the 'extra parameters, etc.' associated with
the fax number attribute...I think I read that somewhere. How do I get rid
of the 0s??

Thanks in advance,
Jordan






<?xml version="1.0" encoding="UTF-8"?><policy>
<rule>
<!-- Step 1-->
<description>Get fax from Source</description>
<conditions>
<and>
<if-class-name op="equal">User</if-class-name>
<if-operation op="equal">modify</if-operation>
<if-op-attr name="Facsimile Telephone Number" op="available"/>
</and>
</conditions>
<actions>
<!-- Create a local variable containing the results from query into the
source tree -->
<do-set-local-variable name="DESCRIPTION_VALUES">
<arg-node-set>
<token-src-attr class-name="User" name="Facsimile Telephone Number"/>
</arg-node-set>
</do-set-local-variable>
</actions>
</rule>
<rule>
<!-- Step 2 -->
<description>Concatenate values</description>
<conditions>
<and>
<if-local-variable name="DESCRIPTION_VALUES" op="available"/>
</and>
</conditions>
<actions>
<!-- Iterate through each value in DESCRIPTION_VALUES and append them
to -->
<!-- CONCAT_DESC separated by commas -->
<do-for-each>
<arg-node-set>
<token-local-variable name="DESCRIPTION_VALUES"/>
</arg-node-set>
<arg-actions>
<do-set-local-variable name="CONCAT_DESC">
<arg-string>
<token-local-variable name="CONCAT_DESC"/>
<token-text xml:space="preserve">, </token-text>
<token-local-variable name="current-node"/>
</arg-string>
</do-set-local-variable>
</arg-actions>
</do-for-each>
<!-- The first time we append a value above, CONCAT_DESC will be blank.
Because -->
<!-- of this, the concatenated string will begin with a comma and space
that aren't really -->
<!-- needed. Here we strip the leading comma and space off. -->
<do-set-local-variable name="CONCAT_DESC">
<arg-string>
<token-replace-first regex=", ">
<token-local-variable name="CONCAT_DESC"/>
</token-replace-first>
</arg-string>
</do-set-local-variable>
</actions>
</rule>
<rule>
<!-- Step 3 -->
<description>Add CONCAT_DESC to doc</description>
<conditions>
<and>
<if-local-variable name="CONCAT_DESC" op="available"/>
</and>
</conditions>
<actions>
<!-- Here we remove the current element and replace it with a new -->
<!-- description element containing the values of concatenated -->
<!-- together. -->
<do-strip-op-attr name="Facsimile Telephone Number"/>
<do-add-dest-attr-value name="Facsimile Telephone Number">
<arg-value type="string">
<token-local-variable name="CONCAT_DESC"/>
</arg-value>
</do-add-dest-attr-value>
<do-set-dest-attr-value name="Facsimile Telephone Number">
<arg-value type="string">
<token-local-variable name="CONCAT_DESC"/>
</arg-value>
</do-set-dest-attr-value>
</actions>
</rule>
</policy>