Imposta utente in put come nuova variabileCiao,
Sto cercando di creare uno script che accetta un input dell'utente e genera questi input in una tabella di dati.
Il mio script di seguito emette una tabella di dati ma non inserisce le variabili utente, qualcuno sarebbe in grado di aiutare perché penso che potrei fraintendere come inserirlo.
v1 = text = " ID"; // two numbers with default
w = New Window( "Synch Request", // opens a window with a title and this content...
Border Box( top( 20 ), bottom( 20 ), Left( 20 ), Right( 20 ), // window dressing
V List Box( // V and H lists nest to organize the display boxes
H Center Box( Text Box( "Please select the tool you wish to view and the date to view from" ) ), // a second title, centered
Spacer Box( size( 1, 30 ) ), // a little vertical space
H List Box( Text Box( "Tool: " ), tool = Text Edit Box( v1 ) ), // data entry
Spacer Box( size( 1, 10 ) ), // a little vertical space
H List Box( Text Box( "Date: " ), date = Calendar Box( ) ), // more data entry
Spacer Box( size( 1, 30 ) ), // a little vertical space
H Center Box( // center the button
Button Box( "Execute", // this script runs when the button is pressed...
// make a new table with the values...
tool_val = tool << GetSelected();
date_val = date << GetSelected();
dt = New Table( "Untitled",
New Column( "a", Character, Set Values( tool_val ) ),
New Column( "b", Numeric,
"Continuous",
//Required due to original format
Format("y/m/d h:m:s"), Set Values( {date} ) ) );
// optionally, close the dialog. Or, you might want to run it again...
w << closeWindow; // just the dialog, not the report
)
)
)
)
);Modellazione statistica avanzataAutomazione e scriptingConsumatori e ricerche di mercatoProgettazione di esperimentiPersonalizzazione di massaQualità e ingegneria di processoRe: Imposta l'utente inserito come nuova variabileControlla il registro, cosa fa
show(date_val);
stampa?
Con il problema della data potrebbe anche essere con questo formato:
Format("y/m/d h:m:s"),
JMP può essere un po' schizzinoso con i formati di tanto in tanto. È possibile rimuovere la formattazione dalla colonna "b" e vedere se riempie la riga con il valore datenum. Quindi puoi provare a vedere quali formati hai a disposizione dal menu dei formati.


Re: Imposta l'utente inserito come nuova variabileFunziona per me su Windows 10, con JMP 15 e JMP 16.Quale versione di JMP e quale sistema operativo?
Re: Imposta l'utente inserito come nuova variabileGrazie, l'idea principale dello script è inserire queste due variabili in uno script separato.
Ho la prima variabile di ID funzionante, tuttavia la data non sembra funzionare.
Re: Imposta l'utente inserito come nuova variabileControlla il registro, fornisce un messaggio di errore abbastanza buono.
Qui è possibile correggere lo script con alcune stampe di supporto (ottengo valori con qualcos'altro di << fatti selezionare, inoltre imposto valori in modo diverso rispetto alla nuova tabella).
Names Default To Here(1);
v1 = text = " ID"; // two numbers with default
w = New Window("Synch Request", // opens a window with a title and this content...
Border Box(top(20), bottom(20), Left(20), Right(20), // window dressing
V List Box( // V and H lists nest to organize the display boxes
H Center Box(Text Box("Please select the tool you wish to view and the date to view from")), // a second title, centered
Spacer Box(size(1, 30)), // a little vertical space
H List Box(Text Box("Tool: "), tool = Text Edit Box(v1)), // data entry
Spacer Box(size(1, 10)), // a little vertical space
H List Box(Text Box("Date: "), date = Calendar Box()), // more data entry
Spacer Box(size(1, 30)), // a little vertical space
H Center Box( // center the button
Button Box("Execute", // this script runs when the button is pressed...
// make a new table with the values...
tool_val = tool << get text;
show(tool_val);
date_val = date << get date;
show(date_val);
dt = New Table("Untitled",
New Column("a", Character, Values(Eval List({tool_val}))),
New Column("b",
Numeric,
"Continuous",
//Required due to original format
Format("y/m/d h:m:s"),
Values(Eval List({date_val}))
)
);
// optionally, close the dialog. Or, you might want to run it again...
w << closeWindow; // just the dialog, not the report
)
)
)
)
);
A seconda del tuo script, potrebbe anche essere una buona idea considerare l'utilizzo della finestra modale