Extending found set using related values

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

Extending found set using related values

Postby Guest » Wed Jan 14, 2004 2:47 pm

I have a contacts table with related clients and related sites held in 2 other tables. I want to be able to find a set of contacts related to client 3, then extend the set with all contacts related to site 1.

If I first perform a find in the contacts table for contacts related to client 3 I get the correct found set. If I then start a new find for contacts related to site 1 followed by Extend Search I get ALL records rather than just the first set (contacts for client 3) plus the second set (contacts for site 1)

This method (which mimics the above) also returns ALL records:

controller.find();
contacts_to_client_sps.clientid = 3;
controller.search( true, false);
controller.find();
contacts_to_site_sps.siteid = 1;
controller.search( false, false);

What am I doing wrong?
Guest
 

Postby Harjo » Wed Jan 14, 2004 3:17 pm

Try this:
Code: Select all
controller.find();
contacts_to_client_sps.clientid = 3;
controller.search( true, true);
controller.find();
contacts_to_site_sps.siteid = 1;
controller.search( false, false);
Harjo
 
Posts: 4321
Joined: Fri Apr 25, 2003 11:42 pm
Location: DEN HAM OV, The Netherlands

Postby drookwood » Wed Jan 14, 2004 3:38 pm

(Sorry - thought I was logged in - original query was from drookwood)

HJK wrote:Try this:
Code: Select all
controller.find();
contacts_to_client_sps.clientid = 3;
controller.search( true, true);
controller.find();
contacts_to_site_sps.siteid = 1;
controller.search( false, false);


I think I tried this before. Just checked again with same result - all records found!
drookwood
 
Posts: 290
Joined: Tue Nov 11, 2003 7:08 pm
Location: Somerset, UK

Postby Jan Blok » Mon Jan 19, 2004 2:48 pm

Bug confirmed, will be fixed in Servoy 2.0 rc3 , thanks for reporting.
Jan Blok
Servoy
Jan Blok
 
Posts: 2684
Joined: Mon Jun 23, 2003 11:15 am
Location: Amsterdam


Return to Programming with Servoy

Who is online

Users browsing this forum: No registered users and 12 guests