How to create variable names of dt objects depending on the loopHi,
How to create variable names of dt objects - dt_valuesarray[i] ?
valuesarray = {};<BR />Summarize( dt_values, valuesarray = by( :Dis ) );<BR />
For( i = 1, i <= N Items( valuesarray ), i++,
dt_values << Select where( :Dis == valuesarray[i] );
<FONT color="#FF0000"><STRONG>dt_valuesarray[i]</STRONG></FONT>=Data Table( "Summary values" ) <<
Subset(
Output Table( "Summary " || valuesarray[i] || ),
Selected Rows( 1 ),
Selected columns only( 0 )
));
Thanks
Re: How to create variable names of dt objects depending on the loop@txnelson @Mark_Bailey, Thanks for your support.
I'll wait for the next version for the Button Box 
I found a way to "solve" it -
I use in Outline Box (close) and it simulates as a Button Box.
Re: How to create variable names of dt objects depending on the loopYour button is a JMP object. Clicking the button causes JMP to evaluate the script associated with the button. Your browser doesn't does not know how to evaluate JSL.
JMP 14 began a separate, parallel development for HTML5. The development of HTML5 content by saving a platform continues as @txnelson said. Now, though, there is another way. See featured JMP Public content to understand the second approach. It requires a JMP server and additional HTML5 code to 'publish' content instead of saving it.
This version of JMP is also available as JMP Live for private use.
Re: How to create variable names of dt objects depending on the loopIs there currently other JMP functionality in interactive HTML or HTML for Button Box?
In fact I'm looking for a solution for an - interactive HTML\HTML page
The page will be include Tab Box and Button Box (as you helped me to write above) .
Do you have a solution to offer for this issue?Re: How to create variable names of dt objects depending on the loopNot all JMP functionality is available in interactive HTML currently. As new releases come out, more functionality becomes available. User specified code, such as the script you wrote for the Button Box is not supported in the HTML display.
Re: How to create variable names of dt objects depending on the loopIn JMP it works great, but in 'Interactive HTML' I can't click the tab - see attached.
The button is invisible.

Re: How to create variable names of dt objects depending on the loopwhat does the log say?Re: How to create variable names of dt objects depending on the loopHi,
It was definitely a simple change.
Next time I will definitely use the guides
Thanks!
This works, but i have an issue when I save the file as HTML, the link to Drill down ("click here") doesn't work.
What could be the reason?
(I didn't find it in the guides
)
Re: How to create variable names of dt objects depending on the loopWhen you are starting to use a new function, you need to study it's options and examples. This is very true of the Tab() function. You need to read the Scripting Guide and it's area on the Tab() function, and then go to the Scripting Index, and study all of the messages(options) and examples shown there for the Tab() function. Here is the simple modification that had to be made from the last example to the new example matching the output you supplied
Names Default To Here( 1 );
dt_values = Current Data Table();
dt_valuesarray = {};
Summarize( dt_values, valuesarray = by( :Dis ) );
For( i = 1, i <= N Items( valuesarray ), i++,
dt_values << Select where( :Dis == valuesarray[i] );
mydt = dt_values << Subset( Output Table( "Summary " || valuesarray[i] ), Selected Rows( 1 ), Selected columns only( 0 ) );
Insert Into( dt_valuesarray, mydt );
Current Journal() << Close window( nosave );
dt_valuesarray[i]() << save( "\\SUMMARY\" || valuesarray[i] || ".jmp " );
dt_valuesarray[i]() << journal;
Current Journal() << Save HTML( "\\SUMMARY\" || valuesarray[i] || ".html" );
Current Journal() << Close window( nosave );
);
//------------------ new window
charts = {};
ob = Outline Box( "Summary Data", Outline Box( "Summary Tables", myTab = Tab Box() ) );
For( i = 1, i <= N Items( valuesarray ), i++,
myTab << Insert(
valuesarray[i],
Eval(
Parse(
"charts[" || Char( i ) ||
"] = Charts_1 = V List Box(
V List Box( dt_valuesarray[i] << get as report() ),
Outline Box( \!"Drill Down Analysis\!", BB = Button Box( \!"Click Here\!", Open( \!"\\SUMMARY\"
|| valuesarray[i] || ".html\!" ))));"
)
);
//dt_vlist << append( );
)
);
dt_tables = New Window( "Tables", ob );Re: How to create variable names of dt objects depending on the loop@txnelson Thanks so much for the response - i'll try it now.
Sorry, I added a picture (Final output how I want it to look) in the previous comment, for some reason doesn't exist, so I added it again.

Re: How to create variable names of dt objects depending on the loopI am not quite sure what you envisioned your final output is supposed to be, so I had to guess. One issue I found, was that you were using a reference to "dt_valuesarray[I]" which will return Data Table("F") or Data Table("M"), when I think you wanted to be referencing "valuesarray[I]" which will return either "F" or "M".
You also had the creation of the V List Box, referenced as dt_vlist, inside of your For() loop. This is why you were only getting one copy of results. On the each time through the For() loop, ds_vlist, was being created all over again.
Within your script for the Button Boxes, you were referencing valuesarray[I]. What is important here, is that the value of "I" is evaluated at the time of the Button Push. That means, then whatever the value of I happens to be when the button is pushed, will determine what file will be opened. I therefore changed the code to hard code in the value when the button box is created.
Finally, you were specifying //SUMMARY in your path for saving files. I don't know if this is a problem on your computer or not. If //SUMMARY is a proper reference, I believe that you will need to add a \ after the SUMMARY to indicate to the operating system of the separation between it and the file name
Names Default To Here( 1 );
dt_values = Current Data Table();
dt_valuesarray = {};
Summarize( dt_values, valuesarray = by( :Dis ) );
For( i = 1, i <= N Items( valuesarray ), i++,
dt_values << Select where( :Dis == valuesarray[i] );
mydt = dt_values << Subset( Output Table( "Summary " || valuesarray[i] ), Selected Rows( 1 ), Selected columns only( 0 ) );
Insert Into( dt_valuesarray, mydt );
Current Journal() << Close window( nosave );
dt_valuesarray[i]() << save( "\\SUMMARY\" || valuesarray[i] || ".jmp " );
dt_valuesarray[i]() << journal;
Current Journal() << Save HTML( "\\SUMMARY\" || valuesarray[i] || ".html" );
Current Journal() << Close window( nosave );
);
//------------------ new window
charts = {};
dt_vlist = V List Box();
For( i = 1, i <= N Items( valuesarray ), i++,
eval(parse(
"charts[" || char(i) || "] = Charts_1 = V List Box(
V List Box( dt_valuesarray[i] << get as report() ),
Outline Box( \!"Drill Down Analysis\!", BB = Button Box( \!"Click Here\!", Open( \!"\\SUMMARY\" || valuesarray[i] || ".html\!" ))));" ));
dt_vlist << append( Outline Box( "Summary Data", Outline Box( "Summary Tables", Tab Box( valuesarray[i], charts[i] ) ) ) );
);
dt_tables = New Window( "Tables", dt_vlist );
Re: How to create variable names of dt objects depending on the loopHi @txnelson,
Can you support me please?
Re: How to create variable names of dt objects depending on the loop@txnelson,
Further to the problem you have solved,
I'm trying to use in the tables I've saved.
I'm using a new window and for each table will have a tabbox
The problems are:
1. Only one tab opens for me for one table - in my case its should be 2 tabs
2. The button box didn't open the file as i saved
dt_values = Current Data Table();
dt_valuesarray = {};
Summarize( dt_values, valuesarray = by( :Dis ) );
For( i = 1, i <= N Items( valuesarray ), i++,
dt_values << Select where( :Dis == valuesarray[i] );
mydt = dt_values << Subset(
Output Table( "Summary " || valuesarray[i] ),
Selected Rows( 1 ),
Selected columns only( 0 )
);
Insert Into( dt_valuesarray, mydt );
Current Journal() << Close window( nosave );
dt_valuesarray [i]() << save( "\\Summary "|| valuesarray[i] ||".jmp " );
dt_valuesarray [i]() << journal;
Current Journal() << Save HTML( "\\Summary "|| valuesarray[i] ||" .html" );
Current Journal() << Close window( nosave );
);
//------------------ new window
charts = {};
For( i = 1, i <= N Items( valuesarray), i++,
charts[i] = Charts_1 = V List Box(
V List Box( dt_valuesarray[i] << get as report() ),
Outline Box( "Drill Down Analysis",
BB = Button Box( "Click Here",
Open( "\\Summary "|| dt_valuesarray[i] ".html" )
)
)
);
dt_vlist= V List Box(
Outline Box( "Summary Data",
Outline Box( "Summary Tables",
TabBox( dt_valuesarray[i], charts[i] ) ) )
));
dt_tables = New Window( "Tables", dt_vlist);
<SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 354px;"><span class="lia-inline-image-display-wrapper" image-alt="Capture.PNG" style="width: 354px;"><img src="https://us.v-cdn.net/6038925/uploads/images/23753i8D6057CAEB44C940/Capture.PNG" role="button" title="Capture.PNG" alt="Capture.PNG" /></span></SPAN>
Thank you so much for your prompt support
Re: How to create variable names of dt objects depending on the loopGreat!
Big thanks @txnelson
Re: How to create variable names of dt objects depending on the loopHere is the way that I handle what you are trying to do.
dt_values = Current Data Table();
dt_valuesarray = {};
Summarize( dt_values, valuesarray = by( :Dis ) );
For( i = 1, i <= N Items( valuesarray ), i++,
dt_values << Select where( :Dis == valuesarray[i] );
mydt = dt_values << Subset(
Output Table( "Summary " || valuesarray[i] ),
Selected Rows( 1 ),
Selected columns only( 0 )
);
Insert Into( dt_valuesarray, mydt );
);
show(dt_valuesarray);