[SortRecordList] SortRecordList on RecordList of TWO structures

Forge Component
Published on 2018-12-20 by Kilian Hekhuis
21 votes
Published on 2018-12-20 by Kilian Hekhuis

SortRecordList works fine for me on a RecordList of a single record definition, but I keep getting the "Failed to compare two elements in the array" message when I try it on a RecordList of mutiple structures.  Example:

ShipToItemList is a record list of two structures (WarehouseItem, ActionResult)

Trying to SortRecordList:
recordList: ToObject(ShipToItemList)
sortBy: "WarehouseItem.ItemNumber, WarehouseItem.SerialNumber"
isAscending: True

ItemNumber & SerialNumber are both attributes of the WarehouseItem structure.

Any help is greatly appreciated!
Hi Bryan,

I'm not too sure the current version of SortRecordList can work with a record list containin two structures. My new version (C# only) certainly can, but that's not incorporated into the main branch of the component. Check out the components discussion if you're interested.

Great, thanks for the reply!  You save me a bunch time trying to figure out why it won't work.