Anonymous_User Absent Member.
Absent Member.

Re: multiple search results in request form field

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


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.getValue("ADGroupSearch")})
> var QueryResult=IDVault.globalQuery( "ADGroupList",
> "InternalResourceCustomQuery",{"internalad":form.getValue("ADGroupSearch")})
> // Thinking that this would store the result in Array
> // and comparing the result with value1 with for loop
> if QueryResult != value1
> {
> field.setValues( value1, value1, true)
> value1 )
> }
> By going through this post i understand
> the IDVault.globalQuery return
> dn,CN
> But QueryResult=IDVault.globalQuery( "ADGroupList",
> "InternalResourceCustomQuery",{"internalad":form.getValue("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?

Labels (1)
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.