How to check if a column is not empty when another is not empty
Hello team, Do you have an idea to help me please: i import a file with multiple column. Column 1 must have a value if the Column 2 is not empty same for the Column 3, but column 2 and 3 are optional, the file can have only 1 column with value i tried (!Relational.ISNULL(row3.Level_2_cd) && !row3.Level_1_cd.equals("")) == (!Relational.ISNULL(row3.Level_3_cd) && !row3.Level_2_cd.equals("")) but that report me an error due to the fact the column 1 is not empty and that in a tmap thanks for your help
it's not easy to explain. in the screenshot, on the left my imported file on the right mut ouput file (out1) and rejected file (reject) i will put in reject file all rows with an level_1_cd empty while level_2_cd full
hello,
i found why, just an issue with my expression.
(!Relational.ISNULL(row3.Level_2_cd) && !row3.Level_1_cd.equals("")) && (!Relational.ISNULL(row3.Level_3_cd) && !row3.Level_2_cd.equals(""))
instead of
(!Relational.ISNULL(row3.Level_2_cd) && !row3.Level_1_cd.equals("")) == (!Relational.ISNULL(row3.Level_3_cd) && !row3.Level_2_cd.equals(""))
Sorry for your time