Removal of records from a foundset

Questions, tips and tricks and techniques for scripting in Servoy

Removal of records from a foundset

Postby paulc » Fri Jan 07, 2011 12:33 am

is there a way to remove a record from a foundset without having to invoke delete, omit or filter parameters, or find?

I have a large list of records and the users want to be able to remove some records from the foundset.

I don't want to delete the record, I only want to remove it from my current list.

Seeing as how we have a foundset, and can highlight records, is there another way to achieve this without having to perfrom the above actions?
paulc
 
Posts: 55
Joined: Wed Feb 17, 2010 8:58 pm

Re: Removal of records from a foundset

Postby Harjo » Fri Jan 07, 2011 1:08 am

omit is your friend!
why don't you wanna use that?
Harjo Kompagnie
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

Re: Removal of records from a foundset

Postby paulc » Fri Jan 07, 2011 2:39 am

HI harjo

If a user was to perform a find on a foundset, omit some records, and perform the original find again, will they get the original results? Or will I need to perform one of the following functions loadAllRecords, loadRecords(dataset), loadRecords(sqlstring), invertRecords() to achieve the original result set?
paulc
 
Posts: 55
Joined: Wed Feb 17, 2010 8:58 pm

Re: Removal of records from a foundset

Postby Harjo » Fri Jan 07, 2011 10:03 am

paulc wrote:HI harjo

If a user was to perform a find on a foundset, omit some records, and perform the original find again, will they get the original results?

yes, if the second find, exactly the same as the first find, you will also see the omitted records again.
Or will I need to perform one of the following functions loadAllRecords, loadRecords(dataset), loadRecords(sqlstring), invertRecords() to achieve the original result set?


I think what you have to do, is store your searchresults (or better your foundset)

that can be done multiple ways.
1. foundset.duplicateFoundSet() - this will make a snapshot of your foundset, you can store that in a MEDIA global (storing it in a blob you have to serialize, it first I think)
2. databaseManager. getSQL() & databaseManager. getSQLParameters() - with those two, you can retrieve the SQL & parameters of the current foundset and store that.

Hope this helps.....
Harjo Kompagnie
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


Return to Methods

Who is online

Users browsing this forum: No registered users and 6 guests