[SortRecordList] Error:Failed to compare two elements in the array. Platform Server : 10.0.709.0

[SortRecordList] Error:Failed to compare two elements in the array. Platform Server : 10.0.709.0

  
Forge Component
(19)
Published on 2017-08-08 by João Portela
19 votes
Published on 2017-08-08 by João Portela

After upgrading to the Platform server 10 (version : 10.0.709.0) i am getting the error in SortRecordList extension

Below is the error. 

1) can you please suggest  what is the issue and why it is happening after Upgrade. Earlier it was working fine


1] Failed to compare two elements in the array.
   at System.Array.SorterObjectArray.IntrospectiveSort(Int32 left, Int32 length)
   at System.Array.Sort(Array keys, Array items, Int32 index, Int32 length, IComparer comparer)
   at System.Collections.ArrayList.Sort(Int32 index, Int32 count, IComparer comparer)
   at OutSystems.HubEdition.RuntimePlatform.Db.OSList`1.#PBb(IComparer comparer)
   at ssLACEApp.RssExtensionSortRecordList.MssSortRecordList(HeContext heContext, Object inParamrecordList, String inParamsortBy, Boolean inParamisAscending)

[2] Could not find field to sort System.Collections.Generic.List`1[System.String]
   at OutSystems.NssSortRecordList.RecordListComparer.Compare(Object x, Object y)
   at System.Array.SorterObjectArray.SwapIfGreaterWithItems(Int32 a, Int32 b)
   at System.Array.SorterObjectArray.PickPivotAndPartition(Int32 lo, Int32 hi)
   at System.Array.SorterObjectArray.IntroSort(Int32 lo, Int32 hi, Int32 depthLimit)
   at System.Array.SorterObjectArray.IntrospectiveSort(Int32 left, Int32 length)

Hi Sunny,

Two remarks:

  1. Are you using the latest version of the component (current latest is 2.0.10)?
  2. Platform 10 has the built-in ListSort Action. If you need to sort on a single Attribute only, I'd advise you to use that one instead.

Hi Sunny,

Please check the input list of SortRecordList extension it should be RecordList instead of  list.

Regards

-SK-

Hi Shasi,

That's probably not true. If you look at the version history, you'll see support for the new List types started at version 2.0.2.

Kilian Hekhuis wrote:

Hi Sunny,

Two remarks:

  1. Are you using the latest version of the component (current latest is 2.0.10)?
  2. Platform 10 has the built-in ListSort Action. If you need to sort on a single Attribute only, I'd advise you to use that one instead.


Thanks for your reply but what made SortRecordList not working in version 10 . it was working fine earlier in versiion 9.

Solution

Hi Sunny,

That's a very good question, to which I don't have an answer. It might be that the underlying internal structure of Lists has changed a bit between version 9 and 10, making the old version of the extension to no longer work. That's why I'd advise to install the latest version.

Solution

Kilian Hekhuis wrote:

Hi Sunny,

That's a very good question, to which I don't have an answer. It might be that the underlying internal structure of Lists has changed a bit between version 9 and 10, making the old version of the extension to no longer work. That's why I'd advise to install the latest version.

Hi Kilian,

Thanks for your suggestion, I upgraded the new version of SortRecordList (version : 2.0.10) and it worked for me

But i have a query: 

  When i see the versions in service center against the SortRecordList, it tells me version : 10.0.708.0  was not working and after i deployed new SortRecordList it was working with version : 10.0.105.0.


Newer version like 10.0.708.0 is not working but version : 10.0.105.0 is working. Attached is the screen shot


Hello Sunny.

That version you are seeing is the Integration Studio version that was last used to save the extension. This is not relevant information, and I don't know why it's so prominently displayed in Service Center.