>Cetin,
>
>No, actual DD_earappdwg.rd_dsort field is built from two table fields from foreign key (joined) table DD_dwgh. DD_dwgh.dh_dwgnum + DD_dwgh.dh_rev (both Char fields).
>
>The problem from your solution as I see it, is that the ChildOrder property of Grid (from my understanding) must match exactly the field data value from RelationalExpr field from LinkMaster (parent) table.
>
>NOTE: ar_rcn, and rd_rcn are Integer data type fields.
>
>Parent table, RelationalExpr field is: DD_ear.ar_rcn
>You've made ChildOrder as: DD_ear.mysorter (rd_rcn+rd_dsort)
>
>Wouldn't this corrupt the exact match link from Child to Parent table for grid contents?
>
>Fz
No it doesn't corrupt (set exact off - default setting). Relation needs to satisfy find a match, and it doesn't care about the characters after match is found. ie:
table1 : cust_id c(5) primary key && Familiar :)
table2 : cust_id c(5), order_id i, order_date d
I want to see all orders of a customer but with sort on date (want to see last order first) :
Table2 :
Index on cust_id+dtoc(order_date,1) tag mySorter descending
use Table2 in 0 order tag mySorter
use Table1 in 0
select Table1
set relation to cust_id into Table2
Or simply w/o setting a relation :
.LinkMaster = 'Table1'
.RelationalExpr = 'cust_id'
.ChildOrder = 'mySorter'
IOW you need a key which has the part that would satisfy relation in front and then your sort order.
Another alternative would be to use either a sorted cursor or a view without a relation (SQL or View parameters would provide the relation)
Cetin