데이터 필터에서 항목을 선택할 때 "작업"을 수행하는 방법을 파악하는 데 문제가 있습니다. 조건을 선택할 때 스크립트가 제한 테이블로 이동 한 다음 그래픽 스크립트에 사용하는 표현식을 채우고 싶습니다. 이것은 데이터 필터의 "where"문에 따라 변경됩니다. 이 작업을 트리거하는 스크립트를 가져 오는 방법 또는 다른 데이터 필터 선택으로 변경하는 경우 어떻게 삭제해야하는지 모르겠습니다. 전체 스크립트 나 샘플 데이터 테이블이 없기 때문에 미리 사과드립니다. 더 많은 정보가 필요하면 최선을 다해 정보를 얻을 것입니다.
감사
// Step 1: Go to the textbox with "Where" statement
Try( test = Report( gb1_S.2 )[Text Box( 5 )] << Get Text );
graph = dt_lim << Get Rows Where( Contains( test, :SPEC_COL_NAMES ) );
// Step 2: If a condition exists, populate the following
f1 = Column( dt_lim, "StartF" )[graph][1]; // x1 for a Marker and starting point for the line
f2 = Column( dt_lim, "StartF" )[graph][2]; // x2 for a Marker and starting point for the line
s1 = (Column( dt_lim, "LSL" )[graph])[1]; // y1 (LSL) for the Line
s2 = (Column( dt_lim, "USL" )[graph])[1]; // y2 (USL) for the Line
color = "Red";
test = Expr(
graph_expr = Eval Insert(
"\[Graph_Script = Expr(
Marker Size( 6 );
Marker( Marker State( 20 ), Color State( "^color^" ), {^f1^, ^s1^}, {^f2^, ^s2^} );
Pen Color( "^color^" );
Line( {^f1^, ^s1^}, {^f2^, ^s2^} );
)]\"
);
Eval( Parse( graph_expr ) );
);
<BR /><BR />// Step 3: Execute the Graphics script<BR /><BR />Report( gb1_S.2 )[Framebox( 1 )] << Add Graphics Script( Graph_Script );필터 선택이 변경 될 때 작업을 트리거하는 방법은 스크립팅 인덱스에서 필터 변경 처리기 만들기를 확인하십시오.
스크립팅 색인의 예 :
Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Cities.jmp");
dist = Distribution(Automatic Recalc(1), Continuous Distribution(Column(:POP)));
filter = dist << Local Data Filter(Add Filter(columns(:Region)));
f = Function({a}, Print(a));
rs = filter << Make Filter Change Handler(f);