Hi,

I am trying to concetenate all the CN values of the members of a group
using a delimiter "|".
when there is a modify event in the group, i need to get the values of
the members of the group which will in the DN format and then use these
DN to get the values of the CN value of the users who are part of the
group then concatenate all the CN's into a single string using a
delimiter.

kindly let me know how to do this.

i was building the below rule.

but it does not work properly.

i am using NIM 3.6.1.

thanks

Below is the Rule:


<rule>
<description>Parsing the local variable</description>
<comment xml:space="preserve">Parsing the local variable</comment>
<conditions>
<and>
<if-class-name mode="nocase" op="equal">Group</if-class-name>
<if-operation mode="case" op="equal">modify</if-operation>
</and>
</conditions>
<actions>
<do-set-local-variable name="MemberDN" scope="policy">
<arg-node-set>
<token-src-attr class-name="Group" name="Member"/>
</arg-node-set>
</do-set-local-variable>
<do-trace-message level="3">
<arg-string>
<token-text xml:space="preserve">Length of th MemberDN:
</token-text>
<token-xpath expression="count($MemberDN)"/>
</arg-string>
</do-trace-message>
<do-set-local-variable name="MemberDNCount" scope="policy">
<arg-string>
<token-xpath expression="count($MemberDN)"/>
</arg-string>
</do-set-local-variable>
<do-set-local-variable name="i" scope="policy">
<arg-string>
<token-text xml:space="preserve">1</token-text>
</arg-string>
</do-set-local-variable>
<do-while>
<arg-conditions>
<and>
<if-local-variable mode="numeric" name="i"
op="not-gt">$MemberDNCount$</if-local-variable>
</and>
</arg-conditions>
<arg-actions>
<do-set-local-variable name="GroupMembers" scope="policy">
<arg-node-set>
<token-join delimiter="|">
<token-local-variable name="GroupMembers"/>
<token-join delimiter="|">
<token-src-attr class-name="User" name="CN">
<arg-dn>
<token-xpath expression="string($MemberDN[number(i)])"/>
</arg-dn>
</token-src-attr>
</token-join>
</token-join>
</arg-node-set>
</do-set-local-variable>
<do-set-local-variable name="i" scope="policy">
<arg-string>
<token-xpath expression="number($i) + 1"/>
</arg-string>
</do-set-local-variable>
</arg-actions>
</do-while>
<do-set-local-variable name="MyCN" scope="policy">
<arg-string>
<token-local-variable name="$GroupMembers[1]$"/>
</arg-string>
</do-set-local-variable>
<do-trace-message level="3">
<arg-string>
<token-text xml:space="preserve">Printing the Query
Result</token-text>
<token-local-variable name="MyCN"/>
</arg-string>
</do-trace-message>
<do-trace-message disabled="true" level="3">
<arg-string>
<token-text xml:space="preserve">Length of th eParsememberDN:
</token-text>
<token-xpath expression="count($ParsedMemberDN)"/>
</arg-string>
</do-trace-message>
</actions>
</rule>


--
mvrk
------------------------------------------------------------------------
mvrk's Profile: http://forums.novell.com/member.php?userid=32023
View this thread: http://forums.novell.com/showthread.php?t=421116