SortRecordList Extension - How To use it??

SortRecordList Extension - How To use it??

  
Hi, i need to sort a record list ( i have a local variable of type record list) and was trying to use the extension SortRecordList....but it is not working....it just eliminates my data....


Does anyone has an example on how to use it?

It's just not enough to fill the parameters provided....

i filled those with the following :

Record List : recordlistToObject(MyRecordList) - (it gives in an error if i just put MyRecordList)
sortby: MyRecordList.myfield
isAscending: false


Best regards,

Diogo CS Cordeiro
Hi Diogo,

You should use ToObject(MyRecordList) and the name of the attribute:

- recordList: ToObject(RecordList var)
- sortBy: column name only (ex: "Name"; don't use "MyEntity.Name")
- isAscending: true | false

CloudWidgetSample uses the SortRecordList extension. You can download it here (search for sortRecordList in the oml).

Paulo Ramos
Thank you Paulo...

The problem was in SortBy...

Perhaps you could add some txt to the solution download screen? Just specifying what to put in the corresponding parameters....

Best regards,

Diogo CS Cordeiro
Thanks for the feedback, I'll forward it to the solution owner.
This extension is really great.
Just used it in a listrecord with the SortWidget
Only had to fumble around with the ascending/descending stuff, because the extension wants to have it as a boolean instead of a string
Hi, i'm trying to use SortRecorlList Extension to sort a Record List by Date but the error : "Failed to compare two elements in the array." is showed on an exception message anyone know's why? 

Thank u
Miguel Grilo wrote:
Hi, i'm trying to use SortRecorlList Extension to sort a Record List by Date but the error : "Failed to compare two elements in the array." is showed on an exception message anyone know's why? 

Thank u
 
Im having the same problem, have you found any solution yet?

im trying to sort a list with multiple structures and have the following specified:
recordList - ToObject(List)
sortBy - "Struc3.Field" (also tried only the field and with/without {}[])
isAscending - True
but always get the same error as you do
Miguel Grilo wrote:
Hi, i'm trying to use SortRecorlList Extension to sort a Record List by Date but the error : "Failed to compare two elements in the array." is showed on an exception message anyone know's why? 

Thank u
 
 Hi Miguel,

do you have an example that you can share? It would be easier to troubleshoot...
Pedro Cardoso wrote:
 
 Hi Miguel,

do you have an example that you can share? It would be easier to troubleshoot...
 
 in case it helps, heres an example from me.

a simple query to the users table, with a test structure, which is assigned to a record list.
this i try sort by User.Name, but get the mentioned error
Hi Pedro,

I have an picture to illustrate how to implement SortRecordList.

SortRecordList
I hope it is useful
Best Regards
Luís Teixeira
unfortunately that doesnt help.
ive basicaly tried the same with the TestSort.oml
but doesnt work
Enigma and Miguel:

I've just uploaded the example to a server, and changed the SortBy to "User.Name".

Check the following pictures of my debug session:

After the assign to list



After sortRecordList:


So... we need to dig in to your system to check why it is not working.

The only change I've made is using "User.Name" as the value to the parameter to "SortBy"
Pedro Cardoso wrote:
Enigma and Miguel:

I've just uploaded the example to a server, and changed the SortBy to "User.Name".

Check the following pictures of my debug session:

After the assign to list



After sortRecordList:


So... we need to dig in to your system to check why it is not working.

The only change I've made is using "User.Name" as the value to the parameter to "SortBy"
 
 Hi,

In accordance with my image above, the OML follows the example of the implementation of the SortrecordList.

Best Regards
Luís Teixeira
wrote:
 
 Hi,

In accordance with my image above, the OML follows the example of the implementation of the SortrecordList.

Best Regards
Luís Teixeira
 
 Hey Luis,

if you're using PSATotal as the SortBy, and if that's an attribute from EntityTest, you should be using "EntityTest.PSATotal" as the value to SortBy, right?

Cheers,
Pedro
Pedro Cardoso wrote:
So... we need to dig in to your system to check why it is not working.
 
 it seems so.... i also tried User.Name but it didnt work
could it be the server version 7.0.0.19? which version are you running?
Yes Pedro,
Ex;
Column Name: PSATotal
Column value:  EntityTest.PSATotal

Best Regards,
Luís Teixeira
enigma wrote:
 
 it seems so.... i also tried User.Name but it didnt work
could it be the server version 7.0.0.19? which version are you running?
 hi,
could see your OML?
Hei Enigma.

You're completly right! I've tested it on  7.0.0.15 and it worked. I've now tested in 7.0.1.5 and it does not.

I'll try to understand it and get back to you.

Cheers,
Pedro
Hello again .

If you follow the discussion thread of the component, you'll find a post by Carlos Anfaro that works with the new version and also adds the possibility to sort by multiple attributes.

Cheers,
Pedro
Pedro Cardoso wrote:
Hello again .

If you follow the discussion thread of the component, you'll find a post by Carlos Anfaro that works with the new version and also adds the possibility to sort by multiple attributes.

Cheers,
Pedro
 
 thank you pedro, that did the trick
Hi all can we use sometjig like Struct1.Column or directly the column name in the structure
i want to sort a output parameter of type List having the Data type as Structure