[SOLVED] Perform update query on all filtered grid results

I have a grid that starts with a search function. After that search function is executed I want to give the user an option to take their results and save them (into a table that I will use to match back for other stuff later). Specifically, what needs to happen is that they click a button and I need to pass the filtered list to a query where I can execute a query that looks like this:

insert into lists_table (personID, listName)
select personID, [listName] from (query that created the filtered grid results);

I need the query that created the filtered grid results. If I’m going about this the entirely wrong way please feel free to correct me. Thanks for any help in advance.


Look at sc_where_current and sc_where_filter in manual. You can retrieve the current filter thru these macros.

That worked great. Thanks gbravi.