Subscribe Bookmark RSS Feed

Scope of Filter Col Selector in Application

cis_pete

Community Trekker

Joined:

Jan 26, 2015

Hello,

I have a question about the Application Builder (in JMP 11).

I have two 'Filter Col Selectors' and two tables. Now I would like to be able to select the columns of table1 with Filter Col Selector1 and the columns of table2 with Filter Col Selector2.

I was able to achieve this if the filter col selectors are in different modules. If you set 'Current Data Table' to the according table before the start of the module it works as desired.

But now I would like to have both filter col selectors in the same module.

I did not succeed so far, with all my tests both filter col selectors worked with the same table (current data table).

Is there a way that the filter col selectors work with different tables although they are in the same module?

Regards

Peter

1 ACCEPTED SOLUTION

Accepted Solutions
Solution

Hi Peter,

There was a bug in the initial versions of JMP 11 that specifically affected the save/restore of applications such as this.  The bug was fixed in JMP 11.2, and would require that you recreate the application so that the saved version is correct.

-Dan

6 REPLIES
danschikore

Staff

Joined:

Sep 21, 2012

Hi Peter,

In this case it is probably easier to avoid the calls to Current Data Table from within the Module scripts.  In a JMP Application, the data table objects have a "Location" property that controls their initialization.  The first data table that is added to the Application (default name DataTable1) will have a Location of Current Data Table, which is essentially the same as:

DataTable1 = Current Data Table();

Since there can only be one current data table at the time the Application runs, subsequent tables will have a Location setting of Name, which will match the table name if it is already open, or open the file using the stored path if there is not an open table with this name.

In order to create the JMP Application that you describe, you will want to follow steps something like this:

  1. Open table 1
  2. Add Filter Col Selector to application
  3. Open table 2 (or make current if it is already open)
  4. Add Filter Col Selector to application

You may have already followed this procedure - Step 3 is important because it tells App Builder that you want to use two different tables.  Having done this, DataTable1 and DataTable2 locations will be as described above.  Now, when you run the Application, you will want your Current Data Table to be table 1.  You can run the Application with a Current Data Table of table 2, but then DataTable1 and DataTable2 will both refer to the same table (this is one way to get the result you describe).

It's possible that you don't really want any of your tables to use Current Data Table().  You can change the DataTable1 Location property to Name, Path (open from a specific path), Prompt (pop up a dialog to map tables) or Script (set variable manually from the Application script).  Depending on your application, various combinations of locations may make sense.

Once you have created your Application with the desired table initialization behaviors, you will want to use DataTable1, DataTable2, etc., within the Application scripts.  This will keep the Application isolated from changes to Current Data Table().

Hope that helps!

-Dan

danschikore

Staff

Joined:

Sep 21, 2012

Attached is an example Application that uses a Filter Col Selector for sample data SATByYear (DataTable1) and Big Class (DataTable2).

When you open the .jmpappsource table, you will get the tables that were used to create the app.  If you open the .jmpapp file (or choose Run Application from within the JMP Application Builder), then DataTable1 will use the Current Data Table and DataTable2 will be Big Class.

cis_pete

Community Trekker

Joined:

Jan 26, 2015

Hi Dan,

thanks a lot for your response.

I already had tried it the way you describe but could not get it to work reliably. I have the same problem with your example.

I modified your example a bit, please see the attachment. I just changed the location for both tables to 'full path'. As you can see FilterCol1 is linked to Data Table1 and FilterCol2 is linked to Data Table2.

Nevertheless it does not work as I would expect. This application worked right after I did the changes and before I saved it. But if you open the saved application now for both Filter Col Selectors always the current data table is used ("Big Class" if no other tables or opened).

That's reproducible here: if you create the application from scratch or modifiy your example then the application runs fine. But if you save, close and reopen the application the Filter Col Selectors always uses the current data table and not the one that is specified.

What am I doing wrong? Or might this be a bug?

Regards

Peter

cis_pete

Community Trekker

Joined:

Jan 26, 2015

PS: I have JMP 11.0.0

Solution

Hi Peter,

There was a bug in the initial versions of JMP 11 that specifically affected the save/restore of applications such as this.  The bug was fixed in JMP 11.2, and would require that you recreate the application so that the saved version is correct.

-Dan

cis_pete

Community Trekker

Joined:

Jan 26, 2015

Hi Dan,

thanks, with JMP 11.2 everything works as expected.

Regards

Peter