Inserimento delle date nella tabella dati dalla finestra di dialogo
Sto cercando di inserire una data in una riga specifica in una tabella di dati dopo che l'utente l'ha inserita da una finestra di dialogo (es: nella riga 5). C'è un modo per fare questo?
Grazie
Names default to Here(1);
dt = New Table( "Untitled",
New Column( "Date 1", Numeric, "Continuous", Format( "yyyy-mm-dd", 12 )),
New Column( "Date 2", Numeric, "Continuous", Format( "yyyy-mm-dd", 12 )),
);
q = New Window( "Enter Dates", // Window for entering dates
Spacer Box( size(500, 30)),
H List Box(
Spacer Box(Size(100, 10)),
V list box (
Spacer Box(Size(10, 15)),
Text Box("Enter Dates (yyyy-mm-dd)"),
Spacer Box(Size(10, 20)),
Text Box("Enter Date 1"),
Spacer Box(Size(10,10)),
fontobj = da = Number Edit box(),
da << Set Format( Format("yyyy-mm-dd", 12)),
da << Set (Date MDY ( 12, 31, 2000)),
Spacer Box(Size(10,10)),
Text Box("Enter Date 2"),
Spacer Box(Size(10,10)),
fontobj = db = Number Edit box(),
db << Set Format( Format("yyyy-mm-dd", 12)),
db << Set (Date MDY ( 12, 31, 2000)),
),
),
Button Box( "Continue",
//code for adding dates to data table
q <<CLOSEWINDOW></CLOSEWINDOW>Tabella datiScriptingRe: Inserimento di date nella tabella dati dalla finestra di dialogoEcco una modifica al codice per gestire sia l'input di testo della data, sia l'input numerico della data.Si noti inoltre che è necessario aggiungere righe alla tabella dati prima che possano essere popolate.
Names Default To Here( 1 );
dt = New Table( "Untitled",
New Column( "Date 1", Numeric, "Continuous", Format( "yyyy-mm-dd", 12 ) ),
New Column( "Date 2", Numeric, "Continuous", Format( "yyyy-mm-dd", 12 ) ),
);
dt << add rows( 1 );
q = New Window( "Enter Dates", // Window for entering dates
Spacer Box( size( 500, 30 ) ),
H List Box(
Spacer Box( Size( 100, 10 ) ),
V List Box(
Spacer Box( Size( 10, 15 ) ),
Text Box( "Enter Dates (yyyy-mm-dd)" ),
Spacer Box( Size( 10, 20 ) ),
Text Box( "Enter Date 1" ),
Spacer Box( Size( 10, 10 ) ),
fontobj = da = Number Edit Box(),
da << Set Format( Format( "yyyy-mm-dd", 12 ) ),
da << Set( Date MDY( 12, 31, 2000 ) ),
Spacer Box( Size( 10, 10 ) ),
Text Box( "Enter Date 2" ),
Spacer Box( Size( 10, 10 ) ),
fontobj2 = db2 = Number Edit Box(),
db2 << Set Format( Format( "yyyy-mm-dd", 12 ) ),
db2 << Set( Date MDY( 12, 31, 2000 ) ),
),
),
Button Box( "Continue",
dt:Date1[1] = da << get;
dt:Date2[1] = Informat( db2 << get text, "yyyy-mm-dd" );
//code for adding dates to data table
q << closewindow;
)
);
Re: Inserimento di date nella tabella dati dalla finestra di dialogoGrazie!