cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar
ckronig
Level III

How to create an application with a data filter in the launch module?

I'm trying to create an application to produce reports based on user input. I have some experience with writing scripting, but am getting stuck and I haven't used Applications before.

I have tried to modify one of the example Applications that come with JMP, but none of these have a data filter in the launch module and what I have tried to do isn't working.

Does anyone have an example of a simple application with a data filter in the launch module that can be used as a starting point? I should then be able to modify that to do what I need to do...

 

10 REPLIES 10
Ressel
Level VI

Re: How to create an application with a data filter in the launch module?

Not sure what you mean by "launch module", but here's how I launch a data filter for a specific column in a given table.

Names default to here(1);

// loads the table
dt = Open( "$SAMPLE_DATA/Cars.jmp" );

// select column
dt << Go To ( :Make );

// identify selection
col = dt << Get Selected Columns( String );

// obtain column reference
col = Column( col[1] );

// launch data filter on selected column
df = dt << Data Filter( Add Filter( Columns( col )));

 

ckronig
Level III

Re: How to create an application with a data filter in the launch module?

Hi Ressel,

thanks for the reply. The "launch module" terminology might be specific to building Applications I think.

 

pauldeen
Level VI

Re: How to create an application with a data filter in the launch module?

@Ressel to make your life a little easier, this does the same in one step:

Names default to here(1);

// loads the table
dt = Open( "$SAMPLE_DATA/Cars.jmp" );

// launch data filter on selected column
df = dt << Data Filter( Add Filter( Columns( "Make" )));
Ressel
Level VI

Re: How to create an application with a data filter in the launch module?

Thanks @pauldeen, I appreciate it. You know, I'm only a level V. 

Re: How to create an application with a data filter in the launch module?

Can you clarify how you are using the data filter in the launch module?  Is the issue that the data filter is not filtering the content, or that you need to pass the filter information to the report module and it is not clear how to do that within Application Builder?

ckronig
Level III

Re: How to create an application with a data filter in the launch module?

Hi Dan,

Thanks for the reply. Yes both of these really I think. I wanted a data filter on the launch module. Then I wanted to pass the filter information so when the report is launched only the selected data is displayed. So if you have an ready made simple example that would be great.

 

Today, I have been trying to do this with a report module only without the launch module. So with a local data filter at the top (datafilter 14 in the picture below), and then multiple reports below within the same overall data filter context, and additional local data filters for each report. I thought I was nearly done, but just now I realised some of the reports were not getting filtered correctly according to the main data filter, i.e. I was seeing data that shouldn't be displayed. I think I inadevertedly moved the data filter and have been trying to correct this so it's in the right container, and am really trying to avoid starting from scratch again. What's the best way to move /rearrange these so they're in the right position?

ckronig_0-1660254026246.png

 

ckronig
Level III

Re: How to create an application with a data filter in the launch module?

I think I worked out why the above didn't work. See below image. With some of the reports, I added another data filter box alongside the report (example report 13 uses data filter 11). The results are corrected filtered using the overall Datafilter 1.

However for Reports 11 and 12, where I didn't add the data filter along side these, Datafilter1 was not being applied. So when I looked at the results from these reports, I had too many records. 

Seems strange to me, but I think I can get it to work now.

ckronig_0-1660307638099.png

 

Re: How to create an application with a data filter in the launch module?

I would have to look at why Report11/Report12 are not filtered - that seems like a bug.  Two suggestions:

  1. With the layout shown above, don't add a DataFilterContext for reports that don't have an (explicit) data filter associated.
  2. One option to simplify the Application layout would be to add filters to the platform directly, for the case where the filter only links to one platform.  If Report13 in the above example has the Data Filter as part of the platform, you do not need to add DataFilterContext12/List11/DataFilter11 to the layout.
ckronig
Level III

Re: How to create an application with a data filter in the launch module?

Thanks Dan.

Indeed I have now simplified the report. I started again from scratch and seems to be working. Not sure why I had problems with the original filtering!

 

One remaining challenge. One of my reports needs to display some text fields, and I am struggling to find a way of wrapping the text, so the width remains in line with the other reports, and the text gets displayed across several lines. I was using the Tabulate platform, but I was reading that there is no option to wrap the text. The only platform that I can see does that automatically is the contingency table, however this also displays additional columns like Col% etc... and when these are hidden, the text gets displayed over a longer width again. I was looking at some of the script functions like "set wrap" etc... but am finding it tricky to see how to use them. Any tips on what I could use here?