related record count in tab's

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

related record count in tab's

Postby Harjo » Mon Dec 20, 2004 4:57 pm

I have a customer-detail view with related tabpanel beneath it with, contacts, offers, invoices, etc..etc..

Hi, I want to show the number of related records in the Tab's of every related tabpanel, so you don't have to click on a tabpanel to see if there are related records.

What is the most effecient-way to do this?
Is it advice-able?
Harjo Kompagnie
byKom B.V.
ServoyCamp
Servoy Certified Developer
Servoy Valued Professional
SAN Developer
Harjo
 
Posts: 4321
Joined: Fri Apr 25, 2003 11:42 pm
Location: DEN HAM OV, The Netherlands

Postby ROCLASI » Mon Dec 20, 2004 6:03 pm

I would use the databaseManager.hasRecords(Object foundset/relatedFoundset) function for this.
No need to get the record count.
If I am correct this is less expensive way to check if you have records.
Robert Ivens
SAN Developer / Servoy Valued Professional / Servoy Certified Developer

ROCLASI Software Solutions / JBS Group, Partner
Mastodon: @roclasi
--
ServoyForge - Building Open Source Software.
PostgreSQL - The world's most advanced open source database.
User avatar
ROCLASI
Servoy Expert
 
Posts: 5438
Joined: Thu Oct 02, 2003 9:49 am
Location: Netherlands/Belgium

Postby Harjo » Mon Dec 20, 2004 6:19 pm

I am now doing it this way: http://forum.servoy.com/viewtopic.php?t ... =count+tab

And it looks quite fast, but I don't know for sure, because I am using this local now!
Harjo Kompagnie
byKom B.V.
ServoyCamp
Servoy Certified Developer
Servoy Valued Professional
SAN Developer
Harjo
 
Posts: 4321
Joined: Fri Apr 25, 2003 11:42 pm
Location: DEN HAM OV, The Netherlands

Postby jcompagner » Mon Dec 20, 2004 6:33 pm

you could try setTitleAtIndex (or something like that) of a tabpanel wit hte parents onrecord selection
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8841
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Postby Harjo » Mon Dec 20, 2004 10:39 pm

Yes, but that has a disadvantage that is not updates instantly when you browse through the main records.

The way I do it now, is very nice, because numbers are instantly updated, even when client add new records.

What I don't know is this is killing my system when I have 25-50 users on my server.
Harjo Kompagnie
byKom B.V.
ServoyCamp
Servoy Certified Developer
Servoy Valued Professional
SAN Developer
Harjo
 
Posts: 4321
Joined: Fri Apr 25, 2003 11:42 pm
Location: DEN HAM OV, The Netherlands

Postby jcompagner » Mon Dec 20, 2004 11:33 pm

by using that tag of setting the relation.count on the title?
This doesn't have any real effect on how many users there are this is pure a client thing. Except one thing and that is that the foundsets are loaded for all tabs the for every record. And if you didn't go to them for a record they didn't have to be loaded yet.
But this doesn't have to mean that it is expensive.
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8841
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet


Return to Programming with Servoy

Who is online

Users browsing this forum: No registered users and 3 guests