Hi all,
I am trying to create a graph using a subset data. And I needed the column value to be concatenated into the slide's title. For example, the title of the slide is "Data for 2023_" and I need to add what specific sex the data is for. Output should be "Data for 2023_Male" and "Data for 2023_Female". Here is the code I have created
For( v=1, v <= N items (dt_sub), v++,
hb1 = HlistBox();
sex_key= Column(dt_sub[v], "Sex") << get values;
hb1 << Append(Eval(Parse(EvalInsert("dt_graphs^v^"))));
hb1a = hb1 << get picture;
ppt1 = OutlineBox("Date for 2023_" || char(sex_key) || ")", hb1a);
ppt1 << savepresentation( pathppt, append, PNG );
);But the output title of the box is Data for 2023_=Scriptable[]
Please help
Which version of JMP are you using? Create new window of your ppt1 and check that the outline box is correct there. I'm using JMP17 and this is working correctly (if I understand what you are trying to do)
Names Default To Here(1);
dt_sub = Eval List({Open("$SAMPLE_DATA/Big Class.jmp")});
dt_graphs1 = dt_sub[1] << get as report;
hb1 = H List Box();
hb1 << Append(Eval(Parse(Eval Insert("dt_graphs^v^"))));
hb1a = hb1 << get picture;
sex_key = Column(dt_sub[v], "Sex") << get values;
ppt1 = Outline Box("Date for 2023_" || Char(sex_key) || ")", hb1a);
ppt1 << Save Presentation("$TEMP/jmp_example.pptx", append, "PNG");
nw = New Window("", ppt1); // use this to verify
Open("$TEMP");
Display Box Messages (jmp.com)
or something like this?
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt_sub = Data Table( "Big Class" ) << Subset(By( :sex ));
pathppt = "C:\temp\ppt.pptx";
For( v=1, v <= N items (dt_sub), v++,
//v= 1;
hb1 = HlistBox();
sex_key= dt_sub[v]<< get name;
hb1 << Append(dt_sub[v] << get as report);
ppt1 = OutlineBox("Date for 2023 " || sex_key, hb1);
ppt1 << savepresentation( pathppt, append, "PNG" );
);