Displaying datasets on multiple tabpanels

I have a form with two tab panels. Each tab panel references the same datasource\table, but two different forms, so that they can be displayed with slightly different fields and a different dataset. For example, on my form, I want users to be able, in one tab panel, to see all the records that are “expiring” in the next 30 days. In a seperate tab panel, I want users to be able to view see all the records that are “assigned” to them.

I can query the records and display the dataset correctly for either of these two scenarios, but when one tabpanel is loaded with a dataset, it changes the other tabpanel to that same dataset. How can I display different datasets of the same table on a single form?

//find and load records into the first tabpanel
var user = globals.currentUser	
var query = "SELECT sir_id FROM aissp WHERE assigned = ? ORDER BY is_num";
var dataset = databaseManager.getDataSetByQuery(controller.getServerName(),query, [user],maxReturnedRows);
forms.form1.controller.loadRecords(dataset);

//find and load records into the second tabpanel
var date = new Date();
var query2 = "SELECT sir_id FROM aissp WHERE expiration < ? ORDER BY expiration";
var dataset2 = databaseManager.getDataSetByQuery(controller.getServerName(),query2, [date],maxReturnedRows);
forms.form2.controller.loadRecords(dataset2);

Hi Wes,

You need to set the namedFoundset form property of (at least one of) the form(s) to ‘Seperate’.
Else both will use the same (shared) foundset and whatever you do on the first form will reflect in the other.

Hope this helps.

perfect, thanks!