Re-Apply a Find/Search??

Hi Folks

I need to use the last find/search criteria to re-apply the search after various filters have been set.

Is this possible? I have the getSQL and the getSQLParameters read after the find/search and I guess I can apply those to reconstruct the foundset, but I’m not sure if using those in a getDataSetByQuery to populate the foundset is the equivalent of the original find/search.

I also use extend/reduce in the find/search and I’m not sure how they will be affected if I use a dataset to create the foundset rather than a find/search - will extend/reduce recognise the dataset as a previous search?

I’m leaning towards capturing the criteria entered in the form fields and saving that for re-use but seems like a lot of work when I have the SQL!

Feedback appreciated.

you can store the current foundset, with

var a = foundset.duplicateFoundSet()

(I even think you can store it temporarily in form variable (MEDIA) )

restoring can be done by doing: foundset.loadRecords(a)

Harjo:
you can store the current foundset, with

var a = foundset.duplicateFoundSet()

(I even think you can store it temporarily in form variable (MEDIA) )

restoring can be done by doing: foundset.loadRecords(a)

Excellent feedback thanks Harjo.