Forum Discussion

sguenther's avatar
sguenther
Advocate II
10 years ago
Solved

How to avoid nested IF loops

Hello everyone,   so I'm in a bit of a pickle. The problem I'm faced with involves filtering Error messages by type out of a database table. So I have a table where each line represents an error th...
  • pqian's avatar
    10 years ago

    assuming your timestamp is generated, then they match a specific pattern - one that you can use to split the column into junk and the actual error string.

     

    Once you have the cleansed column, you can generate the error type in mutiple ways.

    1. In the query editor, use a custom column and the if ... then ... else  M syntax

    2. As a calculated column

    3. As look up table in the query editor defined as a join.

     

    Some other thoughts: if it's possible, you should try to solve this at the source of the problem, when the errors gets generated, insert an error code/type so uniquely identify them. String searchs are never too reliable.