Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am reading data from a table which contains 11 columns. For each of those 11 columns there are min and max rules that are defined.
For each row in a table, I want to check for the min and max rules for each of those 11 columns. I need to track every rule failure. I performed this using tMap. But, the disadvantage here is that I do not exactly know which column failed with the validation. But, I get all the rejects with out information on each of the column failure. Please let me know if there is a way for doing the same ?
Use the tMap variables ( the box in the middle of the tMap) and set up each of your variables (11 of them) to return true (pass) or false (fail). Then in your error output (I assume you have one) use some logic in your error message column (again, I assume you have one) to concatenate your errors. For example....
Var.column1Error ? "Column1 ("+row1.Column1 + ") is outside the min/max limits; " : "" + Var.column2Error ? "Column2 ("+row1.Column2 + ") is outside the min/max limits; " : "" + Var.column3Error ? "Column3 ("+row1.Column3 ") is outside the min/max limits; " : "" + Var.column4Error ? "Column4 ("+row1.Column4 + ") is outside the min/max limits; " : "" + Var.column5Error ? "Column5 ("+row1.Column5 + ") is outside the min/max limits; " : "" + Var.column6Error ? "Column6 ("+row1.Column6 + ") is outside the min/max limits; " : "" + Var.column7Error ? "Column7 ("+row1.Column7 + ") is outside the min/max limits; " : "" + Var.column8Error ? "Column8 ("+row1.Column8 + ") is outside the min/max limits; " : "" + Var.column9Error ? "Column9 ("+row1.Column9 + ") is outside the min/max limits; " : "" + Var.column10Error ? "Column10 ("+row1.Column10 + ") is outside the min/max limits; " : "" + Var.column11Error ? "Column11 ("+row1.Column11 + ") is outside the min/max limits; " : ""
You can obviously add to this (it should be noted that I wrote this freehand with no checking, so there might be typos). Your error output would use filtering based on the tMap variables
Use the tMap variables ( the box in the middle of the tMap) and set up each of your variables (11 of them) to return true (pass) or false (fail). Then in your error output (I assume you have one) use some logic in your error message column (again, I assume you have one) to concatenate your errors. For example....
Var.column1Error ? "Column1 ("+row1.Column1 + ") is outside the min/max limits; " : "" + Var.column2Error ? "Column2 ("+row1.Column2 + ") is outside the min/max limits; " : "" + Var.column3Error ? "Column3 ("+row1.Column3 ") is outside the min/max limits; " : "" + Var.column4Error ? "Column4 ("+row1.Column4 + ") is outside the min/max limits; " : "" + Var.column5Error ? "Column5 ("+row1.Column5 + ") is outside the min/max limits; " : "" + Var.column6Error ? "Column6 ("+row1.Column6 + ") is outside the min/max limits; " : "" + Var.column7Error ? "Column7 ("+row1.Column7 + ") is outside the min/max limits; " : "" + Var.column8Error ? "Column8 ("+row1.Column8 + ") is outside the min/max limits; " : "" + Var.column9Error ? "Column9 ("+row1.Column9 + ") is outside the min/max limits; " : "" + Var.column10Error ? "Column10 ("+row1.Column10 + ") is outside the min/max limits; " : "" + Var.column11Error ? "Column11 ("+row1.Column11 + ") is outside the min/max limits; " : ""
You can obviously add to this (it should be noted that I wrote this freehand with no checking, so there might be typos). Your error output would use filtering based on the tMap variables