When finding records, we currently have 2 options:

1. Do a "DataFlex" find (or Read), in which we have to specify the index to use.
2. Use embedded SQL to fetch records, specifying whatever ordering we want (as part of that query)

Would it be possible to imagine a world where these two things move closer together, and instead of specifying an index (as an integer), we could instead pass the ordering as a string? I guess this is similar to how we can specify a psSqlFilter value. In the case of the latter, it gets used as part of the where clause, but it would be great if we had more flexibility when it came to the ordering.

Now, I know we have Temporary indexes, so the option exists to create one to use, find the records, and then discard. And that's fine, to a point, but it would be quite nice if we didn't need to do this.

Examples of where this would be useful would be things like with data-aware grid column objects. Imagine if each supported its own "psOrdering" property, such that it would be really easy to allow sorting by all columns, regardless of whether there was a suitable index or not.

And on that particular note, if would be great if such a property allowed you to specify parent columns too.

For example, imagine a lookup list for all OrderHeader records (say). And imagine within this, that you had the following 3 columns:

Code:
Object oCustomer_Name is a cDbCJGridColumn
    Entry_Item Customer.Name
    Set piWidth to 140
    Set psCaption to "Customer Name"
End_Object
    
Object oOrderHeader_Order_Number is a cDbCJGridColumn
    Entry_Item OrderHeader.Order_Number
    Set piWidth to 60
    Set psCaption to "Order Number"
End_Object
    
Object oOrderHeader_Order_Date is a cDbCJGridColumn
    Entry_Item OrderHeader.Order_Date
    Set piWidth to 80
    Set psCaption to "Order Date"
End_Object
Currently you could click on a header to (re)order the list by Order_Date and by Order_Number, because there are indexes that support this. But you cannot sort by Customer name. But imagine if for that column we could just add:

Code:
Set psOrdering to '"Customer"."Name","OrderHeader"."Order_Number"'

I think that would be quite a good, and welcome feature. Would something like this be possible? I appreciate one mightn't want to suddenly re-write Request_Find, given the impact that might have, but in the same way as "FindByRowId" was introduced to work along side Find_By_Recnum, what about something like a "Request_Fetch" where the ordering could be a string instead of an existing index? (I'm thinking as I type - there are probably better suggestions)