Search whereHi,
I want to select all rows containing value > 5. In the following script I used for, if and contain statement to select columns containing string "SE" and to highlight row containing values > 5 from the selected column I used the select where( Row() > 5) but doesn't work.
Names Default To Here( 1 );
Clear Globals();
Clear log();
dt = Open("$SAMPLE_DATA/Water Treatment.jmp");
dt << Clear Column Selection();
Col_List = dt << Get Column Names("String");
for(u = 1, u <= N Items(Col_List),u++,
If(Contains(Col_List[u], "SE"),
Column(Col_List[u]) << Set Selected(1);
);
);
dt << Select where( Row() > 5);
ScriptingRe: Search wheredt << Select where( Row() > 5);
is specifying to select all rows, where the row number(row()) is greater than 5.
What you need to do is to replace Row() with the column whos values you want to select if greater than 5.
Check out the documentation on Select Where() in the Scripting Index.
Re: Search whereIt worked
Names Default To Here( 1 );
Clear Globals();
Clear log();
dt = Open("$SAMPLE_DATA/Water Treatment.jmp");
dt << Clear Column Selection();
Col_List = dt << Get Column Names("String");
list = {};
for(u = 1, u <= N Items(Col_List),u++,
If(Contains(Col_List[u], "ZN"),
Column(Col_List[u]) << Set Selected (1);
Insert Into(list, Col_List[u]),
);
);
dt << Select where(as column(list) > 5 );