select where conditions not metI have a script running everyday to determine what parts have failed. We had a day where none of the parts failed and since my select where condition was not ("Fail") it grabbed all the passing parts and output them to the next table. How do I write it so that if no parts fail, the next tables should be blank?
Example:
Data Table ("Parts")<< select where (:PassOrFail == "Fail");
Data Table ("Parts")<< subset (Output Table ("Fails", selected rows (1),selected columns(0)));
Since there were no "Fail" in my PassOrFail Column, the output table "Fails" was just a replica of the original table "Parts"
Data TableScriptingRe: select where conditions not metData Table ("Parts")<< select where (:PassOrFail == "Fail");
If( N Rows( Data Table("Parts") << get selected rows ) > 0,
Data Table ("Parts")<< subset (Output Table ("Fails", selected rows (1),selected columns(0)));
);