dynamically build the filter for an aggregate

So what I would like to do is dynamically build a filter for an aggregate so I can take advantage of the grouping and calculated fields in an aggregate.  So say I have a list of tool usages.  The user, on the page, will enter a list of tools they want to include in the report.  I want to take that list of tools the user builds (the tool ID) and use that for my filter in my aggregate.  Is there a way to do this?
Hi Jason,
I'm not sure if understood correctly your scenario... you want to be able to list tool by userId
(according to usage)?

Can you share your data model or .oml, please?

say I have a data table which is tool usage and it contains a start time, end time and tool id.  The user at the page can select multiple tools that they want to see a table of.  In the aggregate I want to do some grouping and calculated fields and sorting.  So if I do a separate aggregate for each tool they selected and then append them together then the grouping and calculated fields won't work (as I understand it).  So what I want to do is in the aggregate use the list of tools selected to filter the aggregate.  Is that possible?
By selecting each item, you need to "collect the id's" selected.
And then, use can use an Advance Query (with a IN clause), instead of an Aggregate list those tools. 

something like this:

FROM table_name
WHERE column_ID IN (id1,id2,...);
So for all the grouping and calculated fields that I am going to make for the "easy" aggregate, is there a way I could set that up for 1 piece of equipment and then see the SQL query for it that its actually running, copy and then paste that into the advanced query?  In other words use the easy interface to make the aggregate then copy and past the resulting SQL query into the advanced query then just replace the equipment id with what the user is inputting?
Hi Jason, 
I'm sorry for the late reply.
You can copy/paste the SQL generated by the aggregate. You just need to open the aggregate and find "Executed SQL"... and then you can add your "in" clause.