Définir l'utilisateur dans mettre comme nouvelle variableBonjour,
Je cherche à créer un script qui prend une entrée utilisateur et sort ces entrées dans une table de données.
Mon script ci-dessous génère une table de données mais n'insère pas les variables utilisateur, quelqu'un pourrait-il m'aider car je pense que je ne comprends peut-être pas comment l'insérer.
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
)
)
)
)
);Modélisation statistique avancéeAutomatisation et scriptÉtudes de consommation et de marchéConception d'expériencesPersonnalisation de masseIngénierie de la qualité et des procédésRe : Définir l'utilisateur comme nouvelle variableConsultez le journal, qu'est-ce que
show(date_val);
imprimer?
Avec le problème de date pourrait également être avec ce format:
Format("y/m/d h:m:s"),
JMP peut parfois être un peu capricieux avec les formats. Vous pouvez supprimer la mise en forme de la colonne "b" et voir si elle remplit la ligne avec la valeur datenum. Ensuite, vous pouvez essayer de voir quels formats sont disponibles dans le menu des formats.


Re : Définir l'utilisateur comme nouvelle variableCela fonctionne pour moi sur Windows 10, avec JMP 15 et JMP 16.Quelle version de JMP et quel système d'exploitation ?
Re : Définir l'utilisateur comme nouvelle variableMerci, l'idée principale du script est d'entrer ces deux variables dans un script séparé.
J'ai la première variable d'ID qui fonctionne, mais la date ne semble pas fonctionner.
Re : Définir l'utilisateur comme nouvelle variableConsultez le journal, il donne un assez bon message d'erreur.
Voici peut-être un script corrigé avec quelques impressions de support (j'obtiens des valeurs avec autre chose que << se sélectionner, je définis également les valeurs de manière différente de la nouvelle table).
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
)
)
)
)
);
En fonction de votre script, il peut également être judicieux d'envisager d'utiliser une fenêtre modale