Hi,

Being new to this list, I hope my question won't be considered as a
newbie one.

First of all, I am not a Javascript developper, so...

I would like to motify the data retrieved from an LDAP server before it
is sync'ed to the destination LDAP server.

Here is the code I put in a dataset :
<dataset>
<name>st</name>
<policy>FORCE</policy>
<defaultValues></defaultValues>
<forceValues>
<string><![CDATA[
  var st = java.lang.String(srcBean.getDatasetFirstValueById("st"));
        switch (st) {
                case 61: 
                        st = java.lang.String("Orne");
                        break;
                case 50: 
                        st = java.lang.String("Manche");
                        break;
                default:
                        st = java.lang.String("Calvados");
                        break;
                }
                st
]]></string>
</forceValues>
<createValues></createValues>
</dataset>

On the first run, I enclosed the number of the departement with double
quotes (ie : case "61"). Every 'st' has been rewrote "Calvados".

Now that I removed the double-quotes, no modification are applied on
the destination st's.

How can I code something that replaces the departement code with its
textual meaning ?

Thanks for your help.

PS : Sorry for the probably malformed indentations.

-- 
Emmanuel Lesouef
CRBN/DSI/SITI
e: [email protected]
_______________________________________________________________
Ldap Synchronization Connector (LSC) - http://lsc-project.org

lsc-users mailing list
[email protected]
http://lists.lsc-project.org/listinfo/lsc-users

Reply via email to