將 put 中的用戶設置為新變量你好,
我正在創建一個腳本,它接受用戶輸入並將這些輸入輸出到數據表中。
我下面的腳本輸出一個數據表,但不插入用戶變量,有人能夠提供幫助,因為我認為我可能誤解瞭如何插入它。
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
)
)
)
)
);高級統計建模自動化和腳本編寫消費者和市場研究實驗設計大規模定制質量和工藝工程回复:將 put 中的用戶設置為新變量查看日誌,什麼內容
show(date_val);
打印?
對於日期問題也可以採用以下格式:
Format("y/m/d h:m:s"),
有時 JMP 對格式可能有點挑剔。 您可以從“b”列中刪除格式,然後查看它是否用 datenum 值填充該行。 然後您可以嘗試從格式菜單中查看可用的格式。


回复:將 put 中的用戶設置為新變量它適用於 Windows 10 上的 JMP 15 和 JMP 16。JMP 的版本以及操作系統是什麼?
回复:將 put 中的用戶設置為新變量謝謝,該腳本的主要思想是將這兩個變量輸入到單獨的腳本中。
我的第一個 ID 變量有效,但日期似乎不起作用。
回复:將 put 中的用戶設置為新變量查看日誌,它給出了很好的錯誤消息。
這裡可能是帶有一些支持打印的固定腳本(我得到的值不是 << 被選中的值,而且我還以不同的方式將值設置為新表)。
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
)
)
)
)
);
根據您的腳本,考慮使用模式窗口可能也是一個好主意