Hi Jitesh
Following is an example of a transformation script used to migrate multi-value attribute in the source (AD) to a multi-value attribute in ID Cloud. I saw it one of the blogs but cannot find the link for some reason.
I understand your requirement is slightly different, but you could use this as a reference.
------- Transformation Script Start -------
array_of_users = ;
for (let i = 0; i < source.length; i++) {
var parsedCN = source[i].split(‘,’);
var userCN = parsedCN[0].split(‘=’);
var memberQry = openidm.query(“managed/alpha_user”, {
“_queryFilter”: “userName eq '” + userCN[1] + “'”
});
if (memberQry.result.length === 1) {
alphaUserID = { _ref : "managed/alpha_user/" + memberQry.result[0]._id};
array_of_users.push(alphaUserID);
}
}
array_of_users;
------- Transformation Script End -------
In the above script, value of source is read as an array and pushed into another multi-value attribute in ForgeRock.
Your script should be much simpler. For e.g.
------- Transformation Script Start -------
arrayTelephoneNumber = ;
arrayTelephoneNumber.push(source);
arrayTelephoneNumber;
------- Transformation Script End -------
In the above, I assume “source” contains the single telephone number value from ID Cloud and is pushed into an array (called arrayTelephoneNumber) to be sent to IBM LDAP.
Haven’t tried it myself but hope this will work.