cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Submit your abstract to the call for content for Discovery Summit Americas by April 23. Selected abstracts will be presented at Discovery Summit, Oct. 21- 24.
Discovery is online this week, April 16 and 18. Join us for these exciting interactive sessions.
Choose Language Hide Translation Bar
DopeAgonist
Level III

Application Local Data Filter on Bivariate Analysis with Where clause

I'm using the application builder to create multiple bivariate graphs that only includes a subset of the data (with a where clause), and then apply a local data filter where the user can filter that data further. For example, using the Big Class I create a bivariate graph of height v weight and select on the males. Then I want to use a distribution of age as a filter on this bivariate graph. Unfortunately, the filter does not do anything to the graph. When I do the same thing with a bivariate graph without the where (so it includes all data), it works fine. I realize I could simply make two filters for age and sex, but in the context of the data I want to use this with I want to create multiple bivariate graphs that each is defaulted to show only a subset of data already and then can be filtered further.

 

JMP App(
	Set Name( "Dashboard" ),
	Set Description( "Selection in one report filters the second" ),
	Auto Launch( 1 ),
	Snap To Grid( 1 ),
	Show Grid( 1 ),
	Show Properties( 1 ),
	Show Sources( 1 ),
	Group By Category( 0 ),
	Dashboard Mode( 1 ),
	Parameters,
	Tables(
		DataTable1 = GuiTable(
			Set Path( "$SAMPLE_DATA/Big Class.jmp" ),
			Set Label( "Big Class" ),
			Set Location( "Current Data Table" ),
			Set Invisible( 0 )
		)
	),
	Thumbnail(
		New Image(
			Char To Blob(
				"52404eJytVvs70w0b/262OSxzbBPDiKJlqkdozjFny2EqxZZkeNFMZcowcniUEioq51V6ap7MyHLczJVjoSmVc0iKlzzUaPR43r/gvd7r/eFzf67PdR9+uu/PdWd5E10UFTQVAABQdHN18t1i1j+Qg21FkW1wzxZBwhy8HACAmwOXBkO3tHyMa8A5AEC0/QPQdiP3rQ55mJuTAymevFC84Eca0u5YU1o3Pb/eUNy0X3zs4kDEPVR08cM7RK38bPF5X8OHqQMQQ77152UMpk+VTlBXdiKgkO/8dc44pMjdZQkxjdXV8B5bu6Va3J7xknMJilWO8743g/69lkhtmRo7pxv3o0hptuTcInTqcLl3ScfUXPX7KG0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NL9L8e6nf99xs/+2JCFpEvLv1t9wvnpjoQDDd4XVk8+N8C3r2uUNf60ClXovxSJLn1EcxDHUHBZCC4OcMkFm2k6f3u1uetmke4NjwoZeWVDHetYTH0FauMH+2d9ttv/YT3/S6HiCzSOEsGdS3gsDnf7Pzdz9epVV09Pp+Dg8iU3L690Z3ZuJFWRABdMUmKoVGfJ0iXm8nRWIDbSiAx8nNlyhr8qgAGOoypGQVoJ/Kvu0s/vgJ+f3+tMSlDQgyiM8JQyvhhhW3rkC6iGx8vNz1e7FeUOkKnc4/tsbLze2/dSeSQGFov1tckQTT4K9QPHvP2taHm5XfUekvVubGu6I1iO2A5ewp7gxm3qmx9pByt3p0GUi3S3n4qIcCPr3+xtAFcfmBMikiILKkaWdJcvQCewawuemzGyhOd0fPFXuP3vMvIYyzzArBWFwtmHYZRZ44uVcsikk3gcGjE+WcnyNnJSMZLWbHZ3K2xCDeoSC6Hl/LqtNwlwIxCd/jx8KvVvRjw3Wg==",
				"base64compressed"
			),
			"png"
		)
	),
	Script(JSL Quote(// This script is executed when the application is run.
// Named objects have been created for the application modules
// (for example, "Module1") and the pre-defined object
// "thisApplication" refers to the application object itself.
// Variables and functions declared here are scoped to the
// Application namespace.

)	),
	Allocate(
		Module1 = Plan(
			PreAllocate,
			Script(JSL Quote(				thisModuleInstance << Create Objects;				MainTabPage << Set Scriptable Object(thisApplication);			
)			),
			Allocate(
				DataFilterContext1 = Data Filter Context Box();
				MainTabPage = Tab Page Box();
				Splitter1 = H Splitter Box();
				DataFilterSource1 = Data Filter Source Box();
				TabPage2 = Tab Page Box();
				Report2 = Platform(
					DataTable1,
					Distribution(
						Automatic Recalc( 1 ),
						Nominal Distribution( Column( :age ) )
					)
				);
				TabPage1 = Tab Page Box();
				Report1 = Platform(
					DataTable1,
					Bivariate( Y( :weight ), X( :height ), Where( :sex == "F" ) )
				);
			),
			Organize(
				Reparent( TabPage1( Report1 ) );
				Reparent( Splitter1( TabPage1 ) );
				Reparent( TabPage2( Report2 ) );
				Reparent( DataFilterSource1( TabPage2 ) );
				Reparent( Splitter1( DataFilterSource1 ) );
				Reparent( MainTabPage( Splitter1 ) );
				Reparent( DataFilterContext1( MainTabPage ) );
				Relocate( DataFilterContext1( 0, 0 ) );
			),
			Initialize(
				DataFilterContext1 << Background Color( 2147483647 );
				DataFilterContext1 << Border(
					{Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )}
				);
				DataFilterContext1 << Enabled( 1 );
				DataFilterContext1 << Horizontal Alignment( "Default" );
				DataFilterContext1 << Margin(
					{Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )}
				);
				DataFilterContext1 << Padding(
					{Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )}
				);
				DataFilterContext1 << Text Color( 2147483647 );
				DataFilterContext1 << Vertical Alignment( "Default" );
				DataFilterContext1 << Visibility( "Visible" );
				MainTabPage << Background Color( 2147483647 );
				MainTabPage << Border(
					{Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )}
				);
				MainTabPage << Enabled( 1 );
				MainTabPage << Horizontal Alignment( "Default" );
				MainTabPage << Margin(
					{Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )}
				);
				MainTabPage << Padding(
					{Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )}
				);
				MainTabPage << Text Color( 2147483647 );
				MainTabPage << Vertical Alignment( "Default" );
				MainTabPage << Visibility( "Visible" );
				MainTabPage << Title( "Dashboard" );
				MainTabPage << Tip( "" );
				MainTabPage << Icon( "" );
				MainTabPage << Closeable( 0 );
				MainTabPage << Moveable( 0 );
				Splitter1 << Background Color( 2147483647 );
				Splitter1 << Border(
					{Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )}
				);
				Splitter1 << Enabled( 1 );
				Splitter1 << Horizontal Alignment( "Default" );
				Splitter1 << Margin(
					{Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )}
				);
				Splitter1 << Padding(
					{Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )}
				);
				Splitter1 << Text Color( 2147483647 );
				Splitter1 << Vertical Alignment( "Default" );
				Splitter1 << Visibility( "Visible" );
				Splitter1 << Dockable( 1 );
				Splitter1 << Set Width( 593 );
				Splitter1 << Set Height( 525 );
				Splitter1 << Set Sizes( {0.315254237288136, 0.684745762711864} );
				Splitter1 << set horizontal( 1 );
				Splitter1 << Set Min Size( 361, 211 );
				Splitter1 << Set Max Size( 60063, 30040 );
				Splitter1 << Set Auto Stretching( 1, 1 );
				DataFilterSource1 << Background Color( 2147483647 );
				DataFilterSource1 << Border(
					{Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )}
				);
				DataFilterSource1 << Enabled( 1 );
				DataFilterSource1 << Horizontal Alignment( "Default" );
				DataFilterSource1 << Margin(
					{Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )}
				);
				DataFilterSource1 << Padding(
					{Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )}
				);
				DataFilterSource1 << Text Color( 2147483647 );
				DataFilterSource1 << Vertical Alignment( "Default" );
				DataFilterSource1 << Visibility( "Visible" );
				TabPage2 << Background Color( 2147483647 );
				TabPage2 << Border( {Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )} );
				TabPage2 << Enabled( 1 );
				TabPage2 << Horizontal Alignment( "Default" );
				TabPage2 << Margin( {Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )} );
				TabPage2 << Padding(
					{Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )}
				);
				TabPage2 << Text Color( 2147483647 );
				TabPage2 << Vertical Alignment( "Default" );
				TabPage2 << Visibility( "Visible" );
				TabPage2 << Title( "Distributions" );
				TabPage2 << Tip( "" );
				TabPage2 << Icon( "Distrib" );
				TabPage2 << Closeable( 1 );
				TabPage2 << Moveable( 1 );
				TabPage1 << Background Color( 2147483647 );
				TabPage1 << Border( {Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )} );
				TabPage1 << Enabled( 1 );
				TabPage1 << Horizontal Alignment( "Default" );
				TabPage1 << Margin( {Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )} );
				TabPage1 << Padding(
					{Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )}
				);
				TabPage1 << Text Color( 2147483647 );
				TabPage1 << Vertical Alignment( "Default" );
				TabPage1 << Visibility( "Visible" );
				TabPage1 << Title( "TabPage1" );
				TabPage1 << Tip( "" );
				TabPage1 << Icon( "Bivariate" );
				TabPage1 << Closeable( 1 );
				TabPage1 << Moveable( 1 );
			)
		)
	),
	Initialize(
		Module1 << Auto Launch( 1 );
		Module1 << Set Module Type( "Report" );
		Module1 << Set Window Title( "^TABLENAME - ^APPNAME" );
		Module1 << Set Min Size( 0, 0 );
		Module1 << Set Max Size( 30000, 30000 );
		Module1 << Set Auto Stretching( ., . );
	)
) << Edit
1 ACCEPTED SOLUTION

Accepted Solutions
DopeAgonist
Level III

Re: Application Local Data Filter on Bivariate Analysis with Where clause

Great, I'm looking forward to the update!

I'm not sure why mine wasn't working, but I've fixed it (for now) by putting the commands into the script section of the application that gets executed after creating the application.
i.e.
DataFilter1 << Visibility("Hidden");

View solution in original post

8 REPLIES 8
DopeAgonist
Level III

Re: Application Local Data Filter on Bivariate Analysis with Where clause

I found a solution using a Local Data Filter within the bivariate table and setting it to invisible.

 

I accomplished this by replacing the "Report1" section with this:

Report1 = Platform(
					DataTable1,
					Bivariate(
						Y( :weight ),
						X( :height ),
						Automatic Recalc( 1 ),
						Local Data Filter(
							Mode( Include( 0 ) ),
							Add Filter( columns( :sex ), Where( :sex == "M" ) ),
							Invisible
						)
					)
				);

 

So the overall result is:

JMP App(
	Set Name( "Dashboard" ),
	Set Description( "Selection in one report filters the second" ),
	Auto Launch( 1 ),
	Snap To Grid( 1 ),
	Show Grid( 1 ),
	Show Properties( 0 ),
	Show Sources( 1 ),
	Group By Category( 0 ),
	Dashboard Mode( 1 ),
	Parameters,
	Tables(
		DataTable1 = GuiTable(
			Set Path( "$SAMPLE_DATA/Big Class.jmp" ),
			Set Label( "Big Class" ),
			Set Location( "Current Data Table" ),
			Set Invisible( 0 )
		)
	),
	Thumbnail(
		New Image(
			Char To Blob(
				"52404eJytVvs70w0b/262OSxzbBPDSActUz1Cc445hOUwlWIjGV6HmcqUYRQeEaHSwXmVnponM7IcN3PlWGhKcg5J8ZKHGo0ez/sXvNd7vT987s/1ue/7un+67891Z3gQnRQVNBUAAFB0cXbw2mLWP5CDbUWRdWD3FkFC7NztAICbA5cGQre0fLSz73kAQAj/AYifG76wlYO5ONiR4sgLRQvepEHt9jWldeML6/VFjQfFJy/1h91HRRY9ukvUys8SX/Da9SilH7KLb/l5GYPpVaUT1JUdCCjkex+dc3bJcvdYQkxDVRW829pmqQa3b7z4fLxipf28103/f68lUJunxs7rxv4oVJotPr8InTpa5lHcPjVXNRShzePx1JMPmZkNqoTUDcsK4tZXDAmllvHfs8wsPvLlnz59+gasp5MHjMgddXMGhL4nWTMzwVUxVXZggpD+wu8rXABLewODw+Hq0BA6nZ4AipsyNjLqdL2at+YJ4utdXdYDQfacBTWSjfcj4ZwTWAKIOxQRbY7OhQu0kphMtFgsvnPvnqqp9Ce2DCFhLMVZblUqJy3o4ZLL/fqvsgpxEqY134oMkVqbf5rnSFMj0cQ4ZlQPd5BZNDyb3D0nCaSutiyLDjYWJ+kGFUWSCXEWr3t7aW5AFILSbvMglF5vVZVow5q/ecX5SAyE8vbz5JLsw2Mr8X6cfr9Tp/xSRi1TPn1AxB3V65Gd7Uv0TJ90it1vJAksqf3tCJhjCchaPBr+WkC20HZTj722Wl3ibGzxaNwa1PR8Rz4iZ//QUyVae8ABZ7CDZkFvTrqj9rFrh+/cM9VzLUrONIsShYaKFmSpPe4JSqMXjaIYdeyVANCXlcgqfiU/zzPNm+LDHjIHkgQ5wtfIAUpY2qs5oTPF4vRK0Z1C7pRQO5bTrJe1bbXs+0iY+vTt1vmzMTcArkrBYHp6U+RjDqe9dV9fSN9H6RrssWrs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Vw8GWQYtBJc9bTQOTRfjUL08pNBpo/3fovBs/eWPtR/RynvzMdbXH/Jcxb6+2fvFEY3/BOtcY33ypNtab1bJJkmlYYjMPlvAjclmFbMy1hvXtaK/7ZYhpqlFqkXjvTFzNiZWaNqvJEhF2w+GEYN6Okk8jIkre+lIsUylRm9amtUgmNB7LqVwviQnyByIH339HYfhLGhm+o++/nTRK5NWpxQ/I8EeChTsq5XV1tAXDP7M4jbIWY+KgQaGp+civjSbyHgMBkluDfpl4OH9iw5TJlIYP1B0vfxIMTurlZ44vtlw3swlt/1lSJ5oZrX85ewM40xETCv1F+jExaj/KjxOnaIoMvlMRk5U5eO5X+DtJcWUkk8iB9/XTvLIB9JgaGh/oYDcqY6IZ+b7yi0iWonGqzsaYxq1tewJsiBB+IeJzb+fsguUF32TtnfFDMu5i8zGLc4KVLAqZt7rVY2SWrvJDrN/WFEYqBgrxowyJCU8r1edKjMuF32e8bU8Omkk6tXy61Cccn+2IP1TvcXH1zAsDfNu6RmnDT4tghb7L4eiSxzQ7cTQFl4Hg4gCnXLCJpuO315u7bxbq3nAtl5FX3qVjGYOpK0dt/GD/rMty+T+s538pVLyAhlEiuGMJj8Xhbv/nZjIzM53d3BwCA8uWXNzdUx3ZueFURQJcMEmJplIdJUuXmcvTGX7Y8L1k4OPMljP8VQ70c+xVMQrSCuBftZd/fge8vb3fpFP8/R9GYIQByvgihHXJ8S+gah4vNz9f7VbEMYBM5Z46YGXlPmTbQ+WRGFgs1ssqTTT5ONgbHP3ut8Ll5TbV+0jW+7Gt6fZgOWIbeAl7mhu7qW96vA2s3HUVolyouz0gLMyFrH+zpx5cdWhOiEgMLygfWdJdvgidwK4tuG1GyxJe0PFFX+G2v8vIY8zzAJMWFApnG4JRZo0vVsghE8/gcWjE+GQFy2Ovg8peafVmV5fCJtSgNuEOtIxfu/UmAS4EosOfRwNS/gbTRDjy",
				"base64compressed"
			),
			"png"
		)
	),
	Script(JSL Quote(// This script is executed when the application is run.
// Named objects have been created for the application modules
// (for example, "Module1") and the pre-defined object
// "thisApplication" refers to the application object itself.
// Variables and functions declared here are scoped to the
// Application namespace.

)	),
	Allocate(
		Module1 = Plan(
			PreAllocate,
			Script(JSL Quote(				thisModuleInstance << Create Objects;				MainTabPage << Set Scriptable Object(thisApplication);			
)			),
			Allocate(
				DataFilterContext1 = Data Filter Context Box();
				MainTabPage = Tab Page Box();
				Splitter1 = H Splitter Box();
				DataFilterSource1 = Data Filter Source Box();
				TabPage2 = Tab Page Box();
				Report2 = Platform(
					DataTable1,
					Distribution(
						Automatic Recalc( 1 ),
						Nominal Distribution( Column( :age ) )
					)
				);
				TabPage1 = Tab Page Box();
				Report1 = Platform(
					DataTable1,
					Bivariate(
						Y( :weight ),
						X( :height ),
						Automatic Recalc( 1 ),
						Local Data Filter(
							Mode( Include( 0 ) ),
							Add Filter( columns( :sex ), Where( :sex == "M" ) ),
							Invisible
						)
					)
				);
			),
			Organize(
				Reparent( TabPage1( Report1 ) );
				Reparent( Splitter1( TabPage1 ) );
				Reparent( TabPage2( Report2 ) );
				Reparent( DataFilterSource1( TabPage2 ) );
				Reparent( Splitter1( DataFilterSource1 ) );
				Reparent( MainTabPage( Splitter1 ) );
				Reparent( DataFilterContext1( MainTabPage ) );
				Relocate( DataFilterContext1( 0, 0 ) );
			),
			Initialize(
				DataFilterContext1 << Background Color( 2147483647 );
				DataFilterContext1 << Border(
					{Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )}
				);
				DataFilterContext1 << Enabled( 1 );
				DataFilterContext1 << Horizontal Alignment( "Default" );
				DataFilterContext1 << Margin(
					{Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )}
				);
				DataFilterContext1 << Padding(
					{Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )}
				);
				DataFilterContext1 << Text Color( 2147483647 );
				DataFilterContext1 << Vertical Alignment( "Default" );
				DataFilterContext1 << Visibility( "Visible" );
				MainTabPage << Background Color( 2147483647 );
				MainTabPage << Border(
					{Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )}
				);
				MainTabPage << Enabled( 1 );
				MainTabPage << Horizontal Alignment( "Default" );
				MainTabPage << Margin(
					{Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )}
				);
				MainTabPage << Padding(
					{Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )}
				);
				MainTabPage << Text Color( 2147483647 );
				MainTabPage << Vertical Alignment( "Default" );
				MainTabPage << Visibility( "Visible" );
				MainTabPage << Title( "Dashboard" );
				MainTabPage << Tip( "" );
				MainTabPage << Icon( "" );
				MainTabPage << Closeable( 0 );
				MainTabPage << Moveable( 0 );
				Splitter1 << Background Color( 2147483647 );
				Splitter1 << Border(
					{Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )}
				);
				Splitter1 << Enabled( 1 );
				Splitter1 << Horizontal Alignment( "Default" );
				Splitter1 << Margin(
					{Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )}
				);
				Splitter1 << Padding(
					{Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )}
				);
				Splitter1 << Text Color( 2147483647 );
				Splitter1 << Vertical Alignment( "Default" );
				Splitter1 << Visibility( "Visible" );
				Splitter1 << Dockable( 1 );
				Splitter1 << Set Width( 773 );
				Splitter1 << Set Height( 525 );
				Splitter1 << Set Sizes( {0.241558441558441, 0.758441558441559} );
				Splitter1 << set horizontal( 1 );
				Splitter1 << Set Min Size( 361, 211 );
				Splitter1 << Set Max Size( 60063, 30040 );
				Splitter1 << Set Auto Stretching( 1, 1 );
				DataFilterSource1 << Background Color( 2147483647 );
				DataFilterSource1 << Border(
					{Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )}
				);
				DataFilterSource1 << Enabled( 1 );
				DataFilterSource1 << Horizontal Alignment( "Default" );
				DataFilterSource1 << Margin(
					{Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )}
				);
				DataFilterSource1 << Padding(
					{Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )}
				);
				DataFilterSource1 << Text Color( 2147483647 );
				DataFilterSource1 << Vertical Alignment( "Default" );
				DataFilterSource1 << Visibility( "Visible" );
				TabPage2 << Background Color( 2147483647 );
				TabPage2 << Border( {Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )} );
				TabPage2 << Enabled( 1 );
				TabPage2 << Horizontal Alignment( "Default" );
				TabPage2 << Margin( {Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )} );
				TabPage2 << Padding(
					{Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )}
				);
				TabPage2 << Text Color( 2147483647 );
				TabPage2 << Vertical Alignment( "Default" );
				TabPage2 << Visibility( "Visible" );
				TabPage2 << Title( "Distributions" );
				TabPage2 << Tip( "" );
				TabPage2 << Icon( "Distrib" );
				TabPage2 << Closeable( 1 );
				TabPage2 << Moveable( 1 );
				TabPage1 << Background Color( 2147483647 );
				TabPage1 << Border( {Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )} );
				TabPage1 << Enabled( 1 );
				TabPage1 << Horizontal Alignment( "Default" );
				TabPage1 << Margin( {Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )} );
				TabPage1 << Padding(
					{Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )}
				);
				TabPage1 << Text Color( 2147483647 );
				TabPage1 << Vertical Alignment( "Default" );
				TabPage1 << Visibility( "Visible" );
				TabPage1 << Title( "Bivariate Fit of weight By height" );
				TabPage1 << Tip( "" );
				TabPage1 << Icon( "Bivariate" );
				TabPage1 << Closeable( 1 );
				TabPage1 << Moveable( 1 );
			)
		)
	),
	Initialize(
		Module1 << Auto Launch( 1 );
		Module1 << Set Module Type( "Report" );
		Module1 << Set Window Title( "^TABLENAME - ^APPNAME" );
		Module1 << Set Min Size( 0, 0 );
		Module1 << Set Max Size( 30000, 30000 );
		Module1 << Set Auto Stretching( ., . );
	)
) << Run
DopeAgonist
Level III

Re: Application Local Data Filter on Bivariate Analysis with Where clause

This solutions worked briefly, but is not consistent. Now when I run the script below and create the application the local data filter that should be invisible is visible. Any ideas of other methods to accomplish this or why the local data filter might be showing up when it shouldn't are welcome.

txnelson
Super User

Re: Application Local Data Filter on Bivariate Analysis with Where clause

I think you might be able to solve the issue with the "Invisible" setting by instead of using "Invisible", use

current data table()<<show window(0);
Jim
DopeAgonist
Level III

Re: Application Local Data Filter on Bivariate Analysis with Where clause

Hello Jim, Thanks for your reply and suggestion. Can you clarify where in the script I would insert that command? When I put it in the platform allocation, it doesn't seem to do anything. When I put it in the initialize function, it hides the entire application window.

 

I can't figure out how to refer to the platform object itself in the scripting area of the application. Get scriptable object doesn't work and gives me an error that it can't be used on listbox, but I can't find the container which has the platform. Would I want to send the message to that object?

 

Thanks again for your help.

txnelson
Super User

Re: Application Local Data Filter on Bivariate Analysis with Where clause

Since it is not referencing your application directly, but rather pointing to the opened data table, you can actually place it anywhere after the table is opened.  Below, I have just placed it after your "Run" message.

JMP App(
	Set Name( "Dashboard" ),
	Set Description( "Selection in one report filters the second" ),
	Auto Launch( 1 ),
	Snap To Grid( 1 ),
	Show Grid( 1 ),
	Show Properties( 0 ),
	Show Sources( 1 ),
	Group By Category( 0 ),
	Dashboard Mode( 1 ),
	Parameters,
	Tables(
		DataTable1 = GuiTable(
			Set Path( "$SAMPLE_DATA/Big Class.jmp" ),
			Set Label( "Big Class" ),
			Set Location( "Current Data Table" ),
			Set Invisible( 0 )
		)
	),
	Thumbnail(
		New Image(
			Char To Blob(
				"52404eJytVvs70w0b/262OSxzbBPDSActUz1Cc445hOUwlWIjGV6HmcqUYRQeEaHSwXmVnponM7IcN3PlWGhKcg5J8ZKHGo0ez/sXvNd7vT987s/1ue/7un+67891Z3gQnRQVNBUAAFB0cXbw2mLWP5CDbUWRdWD3FkFC7NztAICbA5cGQre0fLSz73kAQAj/AYifG76wlYO5ONiR4sgLRQvepEHt9jWldeML6/VFjQfFJy/1h91HRRY9ukvUys8SX/Da9SilH7KLb/l5GYPp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aGh/oYDcqY6IZ+b7yi0iWonGqzsaYxq1tewJsiBB+IeJzb+fsguUF32TtnfFDMu5i8zGLc4KVLAqZt7rVY2SWrvJDrN/WFEYqBgrxowyJCU8r1edKjMuF32e8bU8Omkk6tXy61Cccn+2IP1TvcXH1zAsDfNu6RmnDT4tghb7L4eiSxzQ7cTQFl4Hg4gCnXLCJpuO315u7bxbq3nAtl5FX3qVjGYOpK0dt/GD/rMty+T+s538pVLyAhlEiuGMJj8Xhbv/nZjIzM53d3BwCA8uWXNzdUx3ZueFURQJcMEmJplIdJUuXmcvTGX7Y8L1k4OPMljP8VQ70c+xVMQrSCuBftZd/fge8vb3fpFP8/R9GYIQByvgihHXJ8S+gah4vNz9f7VbEMYBM5Z46YGXlPmTbQ+WRGFgs1ssqTTT5ONgbHP3ut8Ll5TbV+0jW+7Gt6fZgOWIbeAl7mhu7qW96vA2s3HUVolyouz0gLMyFrH+zpx5cdWhOiEgMLygfWdJdvgidwK4tuG1GyxJe0PFFX+G2v8vIY8zzAJMWFApnG4JRZo0vVsghE8/gcWjE+GQFy2Ovg8peafVmV5fCJtSgNuEOtIxfu/UmAS4EosOfRwNS/gbTRDjy",
				"base64compressed"
			),
			"png"
		)
	),
	Script(JSL Quote(// This script is executed when the application is run.
// Named objects have been created for the application modules
// (for example, "Module1") and the pre-defined object
// "thisApplication" refers to the application object itself.
// Variables and functions declared here are scoped to the
// Application namespace.

)	),
	Allocate(
		Module1 = Plan(
			PreAllocate,
			Script(JSL Quote(				thisModuleInstance << Create Objects;				MainTabPage << Set Scriptable Object(thisApplication);			
)			),
			Allocate(
				DataFilterContext1 = Data Filter Context Box();
				MainTabPage = Tab Page Box();
				Splitter1 = H Splitter Box();
				DataFilterSource1 = Data Filter Source Box();
				TabPage2 = Tab Page Box();
				Report2 = Platform(
					DataTable1,
					Distribution(
						Automatic Recalc( 1 ),
						Nominal Distribution( Column( :age ) )
					)
				);
				TabPage1 = Tab Page Box();
				Report1 = Platform(
					DataTable1,
					Bivariate(
						Y( :weight ),
						X( :height ),
						Automatic Recalc( 1 ),
						Local Data Filter(
							Mode( Include( 0 ) ),
							Add Filter( columns( :sex ), Where( :sex == "M" ) ),
							Invisible
						)
					)
				);
			),
			Organize(
				Reparent( TabPage1( Report1 ) );
				Reparent( Splitter1( TabPage1 ) );
				Reparent( TabPage2( Report2 ) );
				Reparent( DataFilterSource1( TabPage2 ) );
				Reparent( Splitter1( DataFilterSource1 ) );
				Reparent( MainTabPage( Splitter1 ) );
				Reparent( DataFilterContext1( MainTabPage ) );
				Relocate( DataFilterContext1( 0, 0 ) );
			),
			Initialize(
				DataFilterContext1 << Background Color( 2147483647 );
				DataFilterContext1 << Border(
					{Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )}
				);
				DataFilterContext1 << Enabled( 1 );
				DataFilterContext1 << Horizontal Alignment( "Default" );
				DataFilterContext1 << Margin(
					{Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )}
				);
				DataFilterContext1 << Padding(
					{Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )}
				);
				DataFilterContext1 << Text Color( 2147483647 );
				DataFilterContext1 << Vertical Alignment( "Default" );
				DataFilterContext1 << Visibility( "Visible" );
				MainTabPage << Background Color( 2147483647 );
				MainTabPage << Border(
					{Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )}
				);
				MainTabPage << Enabled( 1 );
				MainTabPage << Horizontal Alignment( "Default" );
				MainTabPage << Margin(
					{Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )}
				);
				MainTabPage << Padding(
					{Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )}
				);
				MainTabPage << Text Color( 2147483647 );
				MainTabPage << Vertical Alignment( "Default" );
				MainTabPage << Visibility( "Visible" );
				MainTabPage << Title( "Dashboard" );
				MainTabPage << Tip( "" );
				MainTabPage << Icon( "" );
				MainTabPage << Closeable( 0 );
				MainTabPage << Moveable( 0 );
				Splitter1 << Background Color( 2147483647 );
				Splitter1 << Border(
					{Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )}
				);
				Splitter1 << Enabled( 1 );
				Splitter1 << Horizontal Alignment( "Default" );
				Splitter1 << Margin(
					{Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )}
				);
				Splitter1 << Padding(
					{Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )}
				);
				Splitter1 << Text Color( 2147483647 );
				Splitter1 << Vertical Alignment( "Default" );
				Splitter1 << Visibility( "Visible" );
				Splitter1 << Dockable( 1 );
				Splitter1 << Set Width( 773 );
				Splitter1 << Set Height( 525 );
				Splitter1 << Set Sizes( {0.241558441558441, 0.758441558441559} );
				Splitter1 << set horizontal( 1 );
				Splitter1 << Set Min Size( 361, 211 );
				Splitter1 << Set Max Size( 60063, 30040 );
				Splitter1 << Set Auto Stretching( 1, 1 );
				DataFilterSource1 << Background Color( 2147483647 );
				DataFilterSource1 << Border(
					{Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )}
				);
				DataFilterSource1 << Enabled( 1 );
				DataFilterSource1 << Horizontal Alignment( "Default" );
				DataFilterSource1 << Margin(
					{Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )}
				);
				DataFilterSource1 << Padding(
					{Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )}
				);
				DataFilterSource1 << Text Color( 2147483647 );
				DataFilterSource1 << Vertical Alignment( "Default" );
				DataFilterSource1 << Visibility( "Visible" );
				TabPage2 << Background Color( 2147483647 );
				TabPage2 << Border( {Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )} );
				TabPage2 << Enabled( 1 );
				TabPage2 << Horizontal Alignment( "Default" );
				TabPage2 << Margin( {Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )} );
				TabPage2 << Padding(
					{Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )}
				);
				TabPage2 << Text Color( 2147483647 );
				TabPage2 << Vertical Alignment( "Default" );
				TabPage2 << Visibility( "Visible" );
				TabPage2 << Title( "Distributions" );
				TabPage2 << Tip( "" );
				TabPage2 << Icon( "Distrib" );
				TabPage2 << Closeable( 1 );
				TabPage2 << Moveable( 1 );
				TabPage1 << Background Color( 2147483647 );
				TabPage1 << Border( {Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )} );
				TabPage1 << Enabled( 1 );
				TabPage1 << Horizontal Alignment( "Default" );
				TabPage1 << Margin( {Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )} );
				TabPage1 << Padding(
					{Left( 0 ), Top( 0 ), Right( 0 ), Bottom( 0 )}
				);
				TabPage1 << Text Color( 2147483647 );
				TabPage1 << Vertical Alignment( "Default" );
				TabPage1 << Visibility( "Visible" );
				TabPage1 << Title( "Bivariate Fit of weight By height" );
				TabPage1 << Tip( "" );
				TabPage1 << Icon( "Bivariate" );
				TabPage1 << Closeable( 1 );
				TabPage1 << Moveable( 1 );
			)
		)
	),
	Initialize(
		Module1 << Auto Launch( 1 );
		Module1 << Set Module Type( "Report" );
		Module1 << Set Window Title( "^TABLENAME - ^APPNAME" );
		Module1 << Set Min Size( 0, 0 );
		Module1 << Set Max Size( 30000, 30000 );
		Module1 << Set Auto Stretching( ., . );
	)
) << Run;
current data table() << show window(0);
Jim
DopeAgonist
Level III

Re: Application Local Data Filter on Bivariate Analysis with Where clause

Thanks for clarifying, Jim! I had tried something similar to that and wasn't quite getting the results I wanted. Your example comes close to what I need, but hides all of the associated data tables and graphs. I'm sure if I were more specific with which window to hide it would fix it. I've since found another solution that is working for now. Thanks for your help!!

Re: Application Local Data Filter on Bivariate Analysis with Where clause

Both Local Data Filter and the Selection Filter have been updated in JMP 14 (available March 2018) for better support of subset tables, including reports with By or Where clauses as in your case.  I tested your original script and it appears to work correctly.

 

Your workaround to use a filter instead of the Where is a good approach - I tested with JMP 13.2 and did not see a problem with the filter becoming visible.

 

DopeAgonist
Level III

Re: Application Local Data Filter on Bivariate Analysis with Where clause

Great, I'm looking forward to the update!

I'm not sure why mine wasn't working, but I've fixed it (for now) by putting the commands into the script section of the application that gets executed after creating the application.
i.e.
DataFilter1 << Visibility("Hidden");