Nerissa,
These are two separate indexes you're creating, and you can only have one index as the "current" one at any given moment. When you create the second index, ObjectID, it becomes the current one.
If you want to switch the current index, use the cSet class:
LOCAL loOrder
loOrder = CREATEOBJECT('cSet', 'ORDER', 'ParentID')
Hope that helps,
---J
>Are you saying that my view field in the 'Order by' is not the cause of the problem? But I already have two indexes in my view.
>
>This.createindex('v_dbaseinfo','INDEX ON parentid TAG parentid')
>This.createindex('v_dbaseinfo','INDEX ON objectid TAG objectid')
>
>Do I really need these two indexes and are they in the correct order? Should I not make 'objectid' comes before 'parentid'?
>
>Thanks a lot again.
>
>Nerissa