Customer Portal

How to skip transformation errors in the reformat component?

Comments 3

  • Avatar
    avackova
    0
    Comment actions Permalink
    Hello,
    it should work. Do you remember to return -1 from your transformation function if the string can't be converted?
  • Avatar
    tav
    0
    Comment actions Permalink
    Currently I am getting a Clover exception (I am trying to do a str2date(date,'yyyy-mm-dd-hh:mm:ss'), is there any way I can catch this and return -1? or if I set teh default return to -1 I will get a return of -1 when an exception occurs?

    Thanks

    TAV
  • Avatar
    avackova
    0
    Comment actions Permalink
    Hello TAV,
    catching exception is not possible in CTL. You can use is_date function, before converting or try_conver function instead of str2date. Another solution is to write your transformation in java.

Please sign in to leave a comment.