Welcome Serena Central users! CLICK HERE
The migration of the Serena Central community is currently underway. Be sure to read THIS MESSAGE to get your new login set up to access your account.
wcscis Absent Member.
Absent Member.
142 views

Re: Argument Builder - Sort return values from Query Action

ECMA script is your friend here.
Should be easy to sort there and pass back.

On 8/7/2012 2:36 PM, IDM12 wrote:
>
> Hi,
>
> Is there a simple method of sorting (EX: Alphabetical) the return
> values from a query done through the Argument Builder?
>
> Thanks!
>
>


Labels (1)
0 Likes
3 Replies
Knowledge Partner
Knowledge Partner

Re: Argument Builder - Sort return values from Query Action

On 9/5/2012 12:48 PM, Will Schneider wrote:
> ECMA script is your friend here.
> Should be easy to sort there and pass back.


In fact, if you look at the LDAP ECMA function in IDM 4 they include,
they take an LDAP query, reformat the results into XDS compatible query
responses (<instance> doc with <attr> nodes).

Implementing a sort there ought to be pretty trivial based on the LDAP
query results, and then you have much of what you want. Either this is
a modify of the LDAP function, or a else you can use it as a template
for how you might format an XDS document in ECMA.

If you have Designer 4.x just look for the LDAP common package.


> On 8/7/2012 2:36 PM, IDM12 wrote:
>>
>> Hi,
>>
>> Is there a simple method of sorting (EX: Alphabetical) the return
>> values from a query done through the Argument Builder?
>>
>> Thanks!
>>
>>

>


0 Likes
wcscis Absent Member.
Absent Member.

Re: Argument Builder - Sort return values from Query Action

ECMA script actually has an array sort function.
https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Array/sort



On 9/5/2012 12:10 PM, Geoffrey Carman wrote:
> On 9/5/2012 12:48 PM, Will Schneider wrote:
>> ECMA script is your friend here.
>> Should be easy to sort there and pass back.

>
> In fact, if you look at the LDAP ECMA function in IDM 4 they include, they take an LDAP query,
> reformat the results into XDS compatible query responses (<instance> doc with <attr> nodes).
>
> Implementing a sort there ought to be pretty trivial based on the LDAP query results, and then you
> have much of what you want. Either this is a modify of the LDAP function, or a else you can use it
> as a template for how you might format an XDS document in ECMA.
>
> If you have Designer 4.x just look for the LDAP common package.
>
>
>> On 8/7/2012 2:36 PM, IDM12 wrote:
>>>
>>> Hi,
>>>
>>> Is there a simple method of sorting (EX: Alphabetical) the return
>>> values from a query done through the Argument Builder?
>>>
>>> Thanks!
>>>
>>>

>>

>


0 Likes
Knowledge Partner
Knowledge Partner

Re: Argument Builder - Sort return values from Query Action

On 9/5/2012 2:04 PM, Will Schneider wrote:
> ECMA script actually has an array sort function.
> https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Array/sort


Agreed. What I meant was formatting the results properly as XDS and
that the existing ECMA example would make it a nice template for an example.

>
>
>
> On 9/5/2012 12:10 PM, Geoffrey Carman wrote:
>> On 9/5/2012 12:48 PM, Will Schneider wrote:
>>> ECMA script is your friend here.
>>> Should be easy to sort there and pass back.

>>
>> In fact, if you look at the LDAP ECMA function in IDM 4 they include,
>> they take an LDAP query,
>> reformat the results into XDS compatible query responses (<instance>
>> doc with <attr> nodes).
>>
>> Implementing a sort there ought to be pretty trivial based on the LDAP
>> query results, and then you
>> have much of what you want. Either this is a modify of the LDAP
>> function, or a else you can use it
>> as a template for how you might format an XDS document in ECMA.
>>
>> If you have Designer 4.x just look for the LDAP common package.
>>
>>
>>> On 8/7/2012 2:36 PM, IDM12 wrote:
>>>>
>>>> Hi,
>>>>
>>>> Is there a simple method of sorting (EX: Alphabetical) the return
>>>> values from a query done through the Argument Builder?
>>>>
>>>> Thanks!
>>>>
>>>>
>>>

>>

>


0 Likes
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.