ユーザー入力を新しい変数として設定しますこんにちは、
ユーザー入力を受け取り、これらの入力をデータテーブルに出力するスクリプトを作成しようとしています。
以下の私のスクリプトはデータテーブルを出力しますが、ユーザー変数を挿入しません。挿入方法を誤解している可能性があるので、誰かが助けてくれませんか。
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
)
)
)
)
);高度な統計モデリング自動化とスクリプト作成消費者および市場調査実験計画法マスカスタマイゼーション品質およびプロセスエンジニアリングRe: ユーザー入力を新しい変数として設定しますログを確認してください。何が行われるか
show(date_val);
印刷しますか?
日付の問題は、次の形式でも発生する可能性があります。
Format("y/m/d h:m:s"),
JMP は、フォーマットに関して少し難しい場合があります。 「b」列から書式設定を削除し、行に datenum 値が入力されるかどうかを確認できます。 次に、形式メニューから利用可能な形式を確認してみてください。


Re: ユーザー入力を新しい変数として設定しますWindows 10 では JMP 15 と JMP 16 で動作します。JMP のバージョンとオペレーティング システムは何ですか?
Re: ユーザー入力を新しい変数として設定しますありがとうございます。このスクリプトの主なアイデアは、これら 2 つの変数を別のスクリプトに入力することです。
ID の最初の変数は機能していますが、日付が機能していないようです。
Re: ユーザー入力を新しい変数として設定しますログを確認してください。非常に適切なエラー メッセージが表示されます。
これは、いくつかのサポート印刷を含む修正されたスクリプトである可能性があります(<< get selected 以外の値を取得し、新しいテーブルに異なる方法で値を設定します)。
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
)
)
)
)
);
スクリプトによっては、モーダル ウィンドウの使用を検討するのも良いでしょう。