Relation sort

Questions and answers on designing your Servoy solutions, database modelling and other 'how do I do this' that don't fit in any of the other categories

Relation sort

Postby jbrancoIF » Tue Jul 02, 2019 6:07 pm

Hello,

I have a main form with a tab panel containing a table view with linked records (relation).

If I change the sort of the relation (in code or by clicking on the header of a column), everytime the main record changes, the relation sort is reset.

We can save the sort and reapply it every onRecordSelection, but that's not very efficient.
Does anyone solved this other way or am I missing something?

Thanks in advance,
João
João
InfoForm SA

Servoy 2021.03
jbrancoIF
 
Posts: 68
Joined: Tue Jan 10, 2012 11:29 am

Re: Relation sort

Postby jbrancoIF » Mon Jul 08, 2019 7:04 am

BUMP
João
InfoForm SA

Servoy 2021.03
jbrancoIF
 
Posts: 68
Joined: Tue Jan 10, 2012 11:29 am

Re: Relation sort

Postby mboegem » Mon Jul 08, 2019 8:59 am

Hi,

I don't think anyone will know the answer, since you are only describing behaviour but there are no details on client type, components etc.

So:
1) which client type is this (smart / web / ng?)
2) in case of NG: which component do you use to display the related records, or are you still using a native Servoy table view for this?

Afaik, this didn't happen before, so this might be different behaviour in a specific situation.
Marc Boegem
Solutiative / JBS Group, Partner
• Servoy Certified Developer
• Servoy Valued Professional
• Freelance Developer

Image

Partner of Tower - The most powerful Git client for Mac and Windows
User avatar
mboegem
 
Posts: 1743
Joined: Sun Oct 14, 2007 1:34 pm
Location: Amsterdam

Re: Relation sort

Postby jbrancoIF » Mon Jul 08, 2019 6:30 pm

Thank you for your reply.

I tested this using a plain old smart client with a native servoy table view.
But I didn't mention any client because that's the behavior you have while dealing directly with a foundset object.

foundet.some_relation.sort('pk asc')

only affects the current record.
João
InfoForm SA

Servoy 2021.03
jbrancoIF
 
Posts: 68
Joined: Tue Jan 10, 2012 11:29 am


Return to Programming with Servoy

Who is online

Users browsing this forum: No registered users and 5 guests