Hello,
I would like to use the <<add context function for an outline box as reported in the scripting index. The purpose is to add information to be used by "make combined data table"
w=new window("my window", ob=outline box("my outline"));
ob<<add context (...???);The description in the scripting index does not explain how to pass the "key-value" pair mentioned. I tried different options but with no result.
Can anyone help?
thanks
Matteo
I assume it is used for something like this
Names Default To Here(1);
nw = New Window("Example",
ob1 = Outline Box("Outline Box",
tb1 = table box(string col box("A", {"A", "B", "C"})),
),
ob2 = Outline Box("Outline Box",
table box(string col box("A", {"D", "E", "F"})),
)
);
ob1 << Add Context("Context", "First OB");
ob2 << Add Context("Context", "Second OB");
tb1 << Make Combined Data Table;
Hi @matteo_patelmo ,
I had a mess around with the function, seems its used to create a column and rows into the make combined data table. You could use this to bring in current user generating the report (tracking it with a function) or date or report creation (as some ideas)
w=new window("my window", ob=outline box("my outline", Table Box(
String Col Box( "names",
{"x", "y", "z"}
),
Number Col Box( "values",
{11, 22, 33}
),
Plot Col Box( "values",
{11, 22, 33}
)
)));
ob<<add context("Source", "Study 1");
ob<<add context("Created by", "Ben");
//Hit 'make combined data table' to have these brought in as column headers
Thanks,
Ben
I am not familiar with this option, but here is what I found for documentation from JMP version 16
Thanks @txnelson for your support, unfortunately this will not address my need. Let's see if someone else has suggestions
Matteo
Hi @matteo_patelmo ,
I had a mess around with the function, seems its used to create a column and rows into the make combined data table. You could use this to bring in current user generating the report (tracking it with a function) or date or report creation (as some ideas)
w=new window("my window", ob=outline box("my outline", Table Box(
String Col Box( "names",
{"x", "y", "z"}
),
Number Col Box( "values",
{11, 22, 33}
),
Plot Col Box( "values",
{11, 22, 33}
)
)));
ob<<add context("Source", "Study 1");
ob<<add context("Created by", "Ben");
//Hit 'make combined data table' to have these brought in as column headers
Thanks,
Ben
Thanks, this is what I was looking for.
Matteo
I assume it is used for something like this
Names Default To Here(1);
nw = New Window("Example",
ob1 = Outline Box("Outline Box",
tb1 = table box(string col box("A", {"A", "B", "C"})),
),
ob2 = Outline Box("Outline Box",
table box(string col box("A", {"D", "E", "F"})),
)
);
ob1 << Add Context("Context", "First OB");
ob2 << Add Context("Context", "Second OB");
tb1 << Make Combined Data Table;
Thanks, this is what I need it for.
Matteo
Just wanted to say that this was a great find, I did not know about the <<Add Context() message you could send to a display box. It solved a problem for me right way, making one of my scripts much easier and more efficient. Great example of the knowledge sharing that happens on the Community.
It would be nice if this was better documented. For instance, I think I have discovered that the context pairs have to be strings, e.g.
// this works
box << Add Context("a", "2")
// this does not work
box << Add Context("a", 2)