Populate a multi-valued active roles sync

Hello ARS Experts, I have a need to create a virtual multi-valued attribute and have it populated from a database. I use ARS Synchronization to sync some values already from this table but this new one I'm not sure if it is possible.

The SQL column will contain something like one;two;three. How can I populate the multi-valued virtual attribute properly to have each one of the values delimited in the column from the DB?

Thanks for any help in advanced.

Lu

  • Hi All, I've got this figured out. Although I've not ran it for a large amount. Still waiting on the data to be calculated for what we need. My only worry is the system being overloaded if we have 40k or some employees to update.

    If anyone has information on how to optimize or make this not overload, please let me know.

    Thank you,

    Lu

    $string = $srcObj["dbColumn"]
    $dbColumns = $string.Split(",")
    $return = @()
    ForEach ($value in $dbColumns)
    {
    	$return = $return + $value
    }
    $return

  • if I'm reading that correctly, $dbColumns is an array built from the comma separated list of values in the $srcObj["dbColumn"].

    Looping through that array to create another array seems to be unnecessary.  It's probably not a huge performance gain, but I don't think you need to do it.