The idea is correct.

* Omit the first query, because the 2nd will have the same effect.

* QueryResult will contain a dual array - QueryResult[0] containing the
DN array, QueryResult[1] the display/CNs

* add some ECMAScript that merges QueryResult[0] and value1 skipping the
duplicates (google for such array merge functions if needed)

* finally set the field to the merge result

Wolfgang


On 20.07.2012 22:26, lvaradha wrote:
>
> Hi,
> I am trying the below logic to fix the duplicate values issues. Let me
> know if this would work or not
>
> //This is no the completed
> code
> Storing the GlobalQuery result
> in a array variable
> var value1 = field.getValues();
> IDVault.globalQuery(
> "ADGroupList",
> "InternalResourceCustomQuery",{"internalad":form.g etValue("ADGroupSearch")})
> var QueryResult=IDVault.globalQuery( "ADGroupList",
> "InternalResourceCustomQuery",{"internalad":form.g etValue("ADGroupSearch")})
> // Thinking that this would store the result in Array
> // and comparing the result with value1 with for loop
> if QueryResult[i] != value1[j]
> {
> field.setValues( value1, value1, true)
> field.select( value1 )
> }
>
> By going through this post i understand
> http://forums.novell.com/netiq/netiq...ues-array.html
> the IDVault.globalQuery return
>
> dn,CN
>
> But QueryResult=IDVault.globalQuery( "ADGroupList",
> "InternalResourceCustomQuery",{"internalad":form.g etValue("ADGroupSearch")}.length
> allways return 2. Even though it displays result properly, i am not
> getting the length.
>
> Or is there is any better way to fix this issue?
>
>