Ciao,
Sto generando una nuova finestra (New Window()) per generare un report di una concatenazione tra tabelle.
Mostra l'ultimo record prima della concatenazione, la data odierna e il numero di righe della tabella dati.

Il mio obiettivo è salvare lo script di questa finestra nella tabella dati, per poterlo eseguire dalla tabella dati.
Non so come far funzionare << get script , << new script (se questo è il metodo corretto).
se mostro() lo script generato, in realtà è una combinazione di V list box e non capisco perché... (vedi il log qui sotto)
Grazie per l'aiuto
- Predicatore
La sceneggiatura:
dt = New Table( "datatable_test5",
Add Rows( 7 ),
New Column( "SerialNumber",
Character( 20 ),
"Nominal",
Set Values(
{"DN802111YSKQ45752507", "DN802111YSKQ45752507",
"DN802111YSKQ45752507", "DN802111YSQQ4575X379",
"DN802111YSQQ4575X379", "DN802111YSQQ4575X379",
"DN802111YUAQ45755340"}
),
Set Display Width( 233 )
),
New Column( "stored_at",
Numeric,
"Continuous",
Format( "y/m/d h:m:s", 22, 0 ),
Input Format( "y/m/d h:m:s", 0 ),
Set Values(
[3806904000, 3806990820, 3806904780, 3806905200, 3806992020,
3806906400, 3806906820]
),
Set Display Width( 169 )
),
New Column( "Version",
Character( 9 ),
"Nominal",
Set Values(
{"Version 3", "Version 1", "Version 2", "Version 5",
"Version 4", "Version 2", "Version 3"}
),
Set Display Width( 100 )
),
New Column( "Metric1",
Numeric,
"Continuous",
Format( "Best", 10 ),
Set Property(
"Spec Limits",
{LSL( 0 ), USL( 40 ), Show Limits( 1 )}
),
Set Values(
[16.197252, 6.39561587, 6.5805566, 6.1837729, 16.3159215,
12.7256798, 9.83716952]
),
Set Display Width( 110 )
)
);
oldlastrecord= format(Col Maximum(dt:stored_at), "y/m/d h:m:s");
Newlastrecord= format(today(), "y/m/d h:m:s");
Ndata = Nrows(dt);
ReportMsg = New Window( "Station ---",
//<<MODAL></MODAL>Which generate this log
<CODE class=" language-jsl">ReportScript =
V List Box(
V List Box(
OutlineBox(
TableBox(
StringColBox("2024/08/20 9:47:00 AM"),
StringColBox("2024/09/26 10:46:22 PM"),
NumberColBox(Set Format("Best", 7), Array(7))
)
)
)
);