Default initial sort to a relation

Hello Everybody,

Is it possible to add a default initial sort to a relation?

To be more clear:

Tables:
Hardware
Calls
Actions

I have a form containing two tabpannels. The upper one is showing calls related to the hardware, the bottom one is showing actions related to the call

In both tabpanels is a field completiondate and a calculation Completed(1/0) when completiondate has been filled.

I always want open calls or actions to be on top and then the most recent completiondates from top to bottom. so I sort on:

'Completed asc, completiondate desc'

Now when I walk through the records in tabpanel Calls, the actions related to the calls show correctly. But I cant trigger an event when this related found set updates so I can get the sort right.

With Kind Regards Rene

Hi Rene,

Attach a method to the “onShow” event of the child form - that should do it.

Cheers,

Bob Cusick

Hello Bob

Yes I did that allready but the form does`t hide it just shows another foundset in the tabpanel.

On first show it triggers the method but when the foundset changes it doesn`t get a trigger to execute.

Rene

sort property on a relation will be added in a next release

It seems that the “initialSort” property of a form is not honored if the form is shown in a (related) tab panel. Could this be fixed/added?

Thanks
Patrick

this is because the related foundset is then alreadyloaded (it is set into the form not loaded by the form)
An initial sort only works for normal foundsets that the form itself loads.

We are planning to add a intialsort in the Define Relation dialog.

jcompagner:
We are planning to add a intialsort in the Define Relation dialog.

Great idea!