cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • JMP will suspend normal business operations for our Winter Holiday beginning on Wednesday, Dec. 24, 2025, at 5:00 p.m. ET (2:00 p.m. ET for JMP Accounts Receivable).
    Regular business hours will resume at 9:00 a.m. EST on Friday, Jan. 2, 2026.
  • We’re retiring the File Exchange at the end of this year. The JMP Marketplace is now your destination for add-ins and extensions.

Discussions

Solve problems, and share tips and tricks with other JMP users.
%3CLINGO-SUB%20id%3D%22lingo-sub-554796%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3EHow%20to%20send%20messages%20to%20an%20already%20existing%20local%20data%20filter%20inside%20a%20graph%20builder%20window%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-554796%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EIs%20it%20possible%20to%20send%20messages%20to%20a%20local%20data%20filter%20inside%20a%20graphbuilder%20object%3F%3C%2FP%3E%3CP%3EUnfortunately%2C%20it's%20not%20possible%20to%20define%20a%20varaible%20%22ldf%22%20inside%20the%20graphbuilder%20code%20-%20to%20send%20the%20messages%20to%20%22ldf%22.%3C%2FP%3E%3CP%3EDo%20I%20have%20to%20%22pipe%22%20the%20message%20%22through%20the%20gb%20object%22%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CDIV%20class%3D%22lia-spoiler-container%22%3E%3CA%20class%3D%22lia-spoiler-link%22%20href%3D%22%23%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%20target%3D%22_blank%22%3EView%20more...%3C%2FA%3E%3CNOSCRIPT%3E%3CDIV%20class%3D%22lia-spoiler-content%22%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3Edt%20%3D%20Open(%20%22%24SAMPLE_DATA%2FBig%20Class.jmp%22%20)%3B%0Adt%20%26lt%3B%26lt%3B%20Graph%20Builder(%0A%20Size(%20534%2C%20464%20)%2C%0A%20Show%20Control%20Panel(%200%20)%2C%0A%20Graph%20Spacing(%205%20)%2C%0A%20Variables(%20X(%20%3Aweight%20)%2C%20Y(%20%3Aheight%20)%20)%2C%0A%20Elements(%20Points(%20X%2C%20Y%2C%20Legend(%205%20)%20)%2C%20Smoother(%20X%2C%20Y%2C%20Legend(%206%20)%20)%20)%2C%0A%20Local%20Data%20Filter(%20Add%20Filter(%20columns(%20%3Asex%20)%2C%20Where(%20%3Asex%20%3D%3D%20%22F%22%20)%20)%20)%0A)%3B%0A%0Adf%20%3D%20dt%20%26lt%3B%26lt%3B%20Data%20Filter(%0A%20Location(%20%7B696%2C%2015%7D%20)%2C%0A%20Mode(%20Include(%201%20)%20)%2C%0A%20Add%20Filter(%20columns(%20%3Asex%20)%2C%20Where(%20%3Asex%20%3D%3D%20%22F%22%20)%20)%0A)%3B%0Aldf%20%3D%20(report(gb)%20%26lt%3B%26lt%3B%20Parent)%5B%22Local%20Data%20Filter%22%5D%3B%0A%0Adf%20%26lt%3B%26lt%3B%20Clear%20()%3B%3CBR%20%2F%3E%2F%2Fsame%20for%20ldf%3A%0Aldf%5BbuttonBox(1)%5D%20%26lt%3B%26lt%3B%20click()%3B%0A%0Adf%20%26lt%3B%26lt%3B%20Add%20Filter(%20columns(%20%3Aname)%20)%3B%3CBR%20%2F%3E%2F%2F%26nbsp%3Bsame%26nbsp%3Bfor%26nbsp%3Bldf%3F%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FDIV%3E%3CNOSCRIPT%3E%3CDIV%20class%3D%22lia-spoiler-noscript-content%22%3Edt%20%3D%20Open(%20%22%24SAMPLE_DATA%2FBig%20Class.jmp%22%20)%3B%20dt%20%26lt%3B%26lt%3B%20Graph%20Builder(%20Size(%20534%2C%20464%20)%2C%20Show%20Control%20Panel(%200%20)%2C%20Graph%20Spacing(%205%20)%2C%20Variables(%20X(%20%3Aweight%20)%2C%20Y(%20%3Aheight%20)%20)%2C%20Elements(%20Points(%20X%2C%20Y%2C%20Legend(%205%20)%20)%2C%20Smoother(%20X%2C%20Y%2C%20Legend(%206%20)%20)%20)%2C%20Local%20Data%20Filter(%20Add%20Filter(%20columns(%20%3Asex%20)%2C%20Where(%20%3Asex%20%3D%3D%20%22F%22%20)%20)%20)%20)%3B%20df%20%3D%20dt%20%26lt%3B%26lt%3B%20Data%20Filter(%20Location(%20%7B696%2C%2015%7D%20)%2C%20Mode(%20Include(%201%20)%20)%2C%20Add%20Filter(%20columns(%20%3Asex%20)%2C%20Where(%20%3Asex%20%3D%3D%20%22F%22%20)%20)%20)%3B%20ldf%20%3D%20(report(gb)%20%26lt%3B%26lt%3B%20Parent)%5B%22Local%20Data%20Filter%22%5D%3B%20df%20%26lt%3B%26lt%3B%20Clear%20()%3B%2F%2Fsame%20for%20ldf%3A%20ldf%5BbuttonBox(1)%5D%20%26lt%3B%26lt%3B%20click()%3B%20df%20%26lt%3B%26lt%3B%20Add%20Filter(%20columns(%20%3Aname)%20)%3B%2F%2F%26nbsp%3Bsame%26nbsp%3Bfor%26nbsp%3Bldf%3F%3C%2FDIV%3E%3C%2FNOSCRIPT%3E%3C%2FNOSCRIPT%3E%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-554796%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CLINGO-LABEL%3EAdvanced%20Statistical%20Modeling%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EContent%20Organization%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EData%20Access%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EData%20Exploration%20and%20Visualization%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMass%20Customization%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-568451%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20Ho%20to%20send%20messages%20to%20a%20local%20data%20filter%20inside%20a%20graph%20builder%20window%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-568451%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EAh%2C%20via%20the%20report%20layer!%3CBR%20%2F%3Ethanks.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3E%26lt%3B%3CGET%20scriptable%3D%22%22%20object%3D%22%22%3E%3C%2FGET%3E%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3Eis%20the%20best%20invention!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-568425%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20Ho%20to%20send%20messages%20to%20a%20local%20data%20filter%20inside%20a%20graph%20builder%20window%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-568425%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3Eldf%20%3D%20current%20report()%5B%22Local%20Data%20Filter%22%5D%26lt%3B%3CGET%20scriptable%3D%22%22%20object%3D%22%22%3E%3C%2FGET%3E%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-568422%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20Ho%20to%20send%20messages%20to%20a%20local%20data%20filter%20inside%20a%20graph%20builder%20window%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-568422%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EAnd%20if%20the%20Graph%20is%20already%20there%20and%20I%20want%20to%20get%20the%20settings%20of%20the%20(existing)%20local%20data%20filter%3F%3C%2FP%3E%3CP%3EAny%20chance%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-554831%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20Ho%20to%20send%20messages%20to%20a%20local%20data%20filter%20inside%20a%20graph%20builder%20window%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-554831%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EOh%2C%20sure.%3CBR%20%2F%3ELike%20always%3A%3C%2FP%3E%3CP%3Eenter%20the%20room%20through%20another%20door%20-%20and%20the%20wall%20is%20gone.%3CBR%20%2F%3E%3CBR%20%2F%3EThanks%20Jarmo.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-554830%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20Ho%20to%20send%20messages%20to%20a%20local%20data%20filter%20inside%20a%20graph%20builder%20window%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-554830%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EHere%20is%20an%20example%20taken%20from%20the%20Scripting%20Index%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3ENames%20Default%20To%20Here(%201%20)%3B%0Adt%20%3D%20Open(%20%22%24SAMPLE_DATA%2FTime%20Series%2FAir.jmp%22%20)%3B%0Agb%20%3D%20dt%20%26lt%3B%26lt%3B%20Graph%20Builder(%0A%20Size(%20522%2C%20492%20)%2C%0A%20Show%20Control%20Panel(%200%20)%2C%0A%20Variables(%0A%20%20X(%20%3Amonth%20)%2C%0A%20%20Y(%20%3AOzone%20Concentration%20)%2C%0A%20%20Group%20X(%20%3ASummer%20Months%20Intervention%20)%0A%20)%2C%0A%20Elements(%20Points(%20X%2C%20Y%2C%20Legend(%2010%20)%20)%2C%20Smoother(%20X%2C%20Y%2C%20Legend(%2011%20)%20)%20)%2C%20%0A%0A)%3B%0Aldf%20%3D%20gb%20%26lt%3B%26lt%3B%20Local%20Data%20Filter(%0A%20Add%20Filter(%20columns(%20%3Adate%20)%2C%20Where(%20%3Adate%20%26gt%3B%3D%2016Oct1965%20%26amp%3B%20%3Adate%20%26lt%3B%3D%2031Aug1968%20)%20)%0A)%3B%0Afc%20%3D%20ldf%20%26lt%3B%26lt%3B%20Get%20Filter%20Column(%20%3Adate%20)%3B%0Afc%20%26lt%3B%26lt%3B%20Zoom%20to%20Selection%3B%0AWait(%201%20)%3B%0Afc%20%26lt%3B%26lt%3B%20Reset%20Zoom%3B%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-554829%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20Ho%20to%20send%20messages%20to%20a%20local%20data%20filter%20inside%20a%20graph%20builder%20window%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-554829%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EYou%20could%20add%20local%20data%20filter%20after%20graph%20builder%20has%20been%20created%2C%20this%20will%20let%20you%20have%20a%20reference%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3ENames%20Default%20To%20Here(1)%3B%0A%0Adt%20%3D%20Open(%22%24SAMPLE_DATA%2FBig%20Class.jmp%22)%3B%0Agb%20%3D%20dt%20%26lt%3B%26lt%3B%20Graph%20Builder(%0A%20Size(534%2C%20464)%2C%0A%20Show%20Control%20Panel(0)%2C%0A%20Graph%20Spacing(5)%2C%0A%20Variables(X(%3Aweight)%2C%20Y(%3Aheight))%2C%0A%20Elements(Points(X%2C%20Y%2C%20Legend(5))%2C%20Smoother(X%2C%20Y%2C%20Legend(6)))%0A)%3B%0A%0Aldf%20%3D%20gb%20%26lt%3B%26lt%3B%20Local%20Data%20Filter(Add%20Filter(columns(%3Asex)%2C%20Where(%3Asex%20%3D%3D%20%22F%22)))%3B%0Await(1)%3B%0Aldf%20%26lt%3B%26lt%3B%20Clear()%3B%0Aldf%20%26lt%3B%26lt%3B%20Add%20Filter(%20columns(%20%3Aname)%20)%3B%2F%2F%20same%20for%20ldf%3F%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FLINGO-BODY%3E
Choose Language Hide Translation Bar
hogi
Level XIII

How to send messages to an already existing local data filter inside a graph builder window

Is it possible to send messages to a local data filter inside a graphbuilder object?

Unfortunately, it's not possible to define a varaible "ldf" inside the graphbuilder code - to send the messages to "ldf".

Do I have to "pipe" the message "through the gb object"?

 

 

View more...
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt << Graph Builder(
	Size( 534, 464 ),
	Show Control Panel( 0 ),
	Graph Spacing( 5 ),
	Variables( X( :weight ), Y( :height ) ),
	Elements( Points( X, Y, Legend( 5 ) ), Smoother( X, Y, Legend( 6 ) ) ),
	Local Data Filter( Add Filter( columns( :sex ), Where( :sex == "F" ) ) )
);

df = dt << Data Filter(
	Location( {696, 15} ),
	Mode( Include( 1 ) ),
	Add Filter( columns( :sex ), Where( :sex == "F" ) )
);
ldf = (report(gb) << Parent)["Local Data Filter"];

df << Clear ();
//same for ldf: ldf[buttonBox(1)] << click(); df << Add Filter( columns( :name) );
// same for ldf?
2 ACCEPTED SOLUTIONS

Accepted Solutions
jthi
Super User

Re: Ho to send messages to a local data filter inside a graph builder window

You could add local data filter after graph builder has been created, this will let you have a reference

Names Default To Here(1);

dt = Open("$SAMPLE_DATA/Big Class.jmp");
gb = dt << Graph Builder(
	Size(534, 464),
	Show Control Panel(0),
	Graph Spacing(5),
	Variables(X(:weight), Y(:height)),
	Elements(Points(X, Y, Legend(5)), Smoother(X, Y, Legend(6)))
);

ldf = gb << Local Data Filter(Add Filter(columns(:sex), Where(:sex == "F")));
wait(1);
ldf << Clear();
ldf << Add Filter( columns( :name) );// same for ldf?
-Jarmo

View solution in original post

txnelson
Super User

Re: Ho to send messages to a local data filter inside a graph builder window

ldf = current report()["Local Data Filter"]<<get scriptable object;
Jim

View solution in original post

6 REPLIES 6
jthi
Super User

Re: Ho to send messages to a local data filter inside a graph builder window

You could add local data filter after graph builder has been created, this will let you have a reference

Names Default To Here(1);

dt = Open("$SAMPLE_DATA/Big Class.jmp");
gb = dt << Graph Builder(
	Size(534, 464),
	Show Control Panel(0),
	Graph Spacing(5),
	Variables(X(:weight), Y(:height)),
	Elements(Points(X, Y, Legend(5)), Smoother(X, Y, Legend(6)))
);

ldf = gb << Local Data Filter(Add Filter(columns(:sex), Where(:sex == "F")));
wait(1);
ldf << Clear();
ldf << Add Filter( columns( :name) );// same for ldf?
-Jarmo
hogi
Level XIII

Re: Ho to send messages to a local data filter inside a graph builder window

Oh, sure.
Like always:

enter the room through another door - and the wall is gone.

Thanks Jarmo.

 

 

txnelson
Super User

Re: Ho to send messages to a local data filter inside a graph builder window

Here is an example taken from the Scripting Index

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Time Series/Air.jmp" );
gb = dt << Graph Builder(
	Size( 522, 492 ),
	Show Control Panel( 0 ),
	Variables(
		X( :month ),
		Y( :Ozone Concentration ),
		Group X( :Summer Months Intervention )
	),
	Elements( Points( X, Y, Legend( 10 ) ), Smoother( X, Y, Legend( 11 ) ) ), 

);
ldf = gb << Local Data Filter(
	Add Filter( columns( :date ), Where( :date >= 16Oct1965 & :date <= 31Aug1968 ) )
);
fc = ldf << Get Filter Column( :date );
fc << Zoom to Selection;
Wait( 1 );
fc << Reset Zoom;
Jim
hogi
Level XIII

Re: Ho to send messages to a local data filter inside a graph builder window

And if the Graph is already there and I want to get the settings of the (existing) local data filter?

Any chance?

txnelson
Super User

Re: Ho to send messages to a local data filter inside a graph builder window

ldf = current report()["Local Data Filter"]<<get scriptable object;
Jim
hogi
Level XIII

Re: Ho to send messages to a local data filter inside a graph builder window

Ah, via the report layer!
thanks.

 

<<get scriptable object;

is the best invention!

Recommended Articles