Le 28/09/2017 à 11:02, Clément OUDOT a écrit :
Le 28/09/2017 à 10:32, Jehan Procaccia a écrit :
hello,
we have a multivalue attribute (supannRefId) that contains all the ID
in other databases an entry can have, example
SupannRefID: {SQLDB1}12345
SupannRefID: {AD}6789789341
SupannRefID: {LIBRARYDB}AZE123
etc ..
How can I configure LSC to syncrhonize only {LIBRARYDB}AZE123 value
of SupannRefID and not the other values ?
Thanks for your advices .
Hello Jehan,
in the dataset, just create some script that will loop on source
values, then return only wanted values.
Here is a sample code (not tested) :
---------
<dataset>
<name>SupannRefID</name>
<policy>FORCE</policy>
<forceValues>
<string>
<![CDATA[rjs:
var srids = srcBean.getDatasetValuesById("SupannRefID");
var values = new java.util.ArrayList();
for (var i=0; i<srids.size(); i++) {
var srid = srids.get(i);
if (srid.match(/{LIBRARYDB}/) {
values.add(srid); }
}
values;
]]>
</string>
</forceValues>
</dataset>
---------
Very good, that code works out of the box .
thanks a lot .
jehan .
_______________________________________________________________
Ldap Synchronization Connector (LSC) - http://lsc-project.org
lsc-users mailing list
[email protected]
https://lists.lsc-project.org/cgi-bin/mailman/listinfo/lsc-users