사용자 입력을 새 변수로 설정안녕하세요,
사용자 입력을 받아 이러한 입력을 데이터 테이블로 출력하는 스크립트를 만들려고 합니다.
아래의 내 스크립트는 데이터 테이블을 출력하지만 사용자 변수를 삽입하지 않습니다. 삽입 방법을 오해하고 있다고 생각하는 사람이 도움을 줄 수 있습니까?
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: 사용자 입력을 새 변수로 설정합니다.JMP 15 및 JMP 16과 함께 Windows 10에서 작동합니다.JMP 버전과 운영 체제는 무엇입니까?
Re: 사용자 입력을 새 변수로 설정합니다.감사합니다. 스크립트의 주요 아이디어는 이 두 변수를 별도의 스크립트에 입력하는 것입니다.
ID 작업의 첫 번째 변수가 있지만 날짜가 작동하지 않는 것 같습니다.
Re: 사용자 입력을 새 변수로 설정합니다.로그를 확인하면 꽤 좋은 오류 메시지가 표시됩니다.
다음은 일부 지원 인쇄가 있는 고정 스크립트일 수 있습니다(<<가 선택되지 않은 값을 가져오고 새 테이블과 다른 방식으로 값을 설정함).
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
)
)
)
)
);
스크립트에 따라 모달 창 사용을 고려하는 것도 좋은 생각일 수 있습니다.