Email If statement error when using "LCase" formula

Answered

Comments

5 comments

  • Avatar
    Mathias Balsløw (Edited )

    Hi Ghita!

    We have not heard about this issue before. I will do some digging today and investigate. In the meantime, do you also experience issues with this if you create a variable setting its value to the email subject token and then use the variable instead of the token in your formula?

    0
    Comment actions Permalink
  • Avatar
    Ghita Fjorback

    Hi Mathias

    I did not try that. I will change the particular script right away and check if I get any errors.

    thanks

    Ghita

    0
    Comment actions Permalink
  • Avatar
    Ghita Fjorback

    hmm... did some more testing.

    1. when the script is "running" it will return with an error on the if-statement. If I manually double-click the if-statement, it will work.

    2. I tried creating a variable with the [?LCase([*CURRENT_EMAIL_SUBJECT])], and the variable will be created, with a blank value!

    3. Created a variable with value [*CURRENT_EMAIL_SUBJECT] - created the variable and the value was correct (FW: Message from "RNP583879273CB3" / NGB/OSL/00225)

    4. After creating a variable with the current email subject, I did a new IF-statement with LCase from the variable, and the same error came like before. If I manually run the if-statement all is good, but when pressing play it will result in an error! :o(

    I guess there must be something in the email subject that it will tricker the error on. maybe the apostrophes!?

    Thanks

    Ghita

    0
    Comment actions Permalink
  • Avatar
    Ghita Fjorback

    so.. I fixed it by using the formula like this, but I guess this still need to be investigated, since something is triggering an error where it shouldn't.

    [?LCase([?Remove([*CURRENT_EMAIL_SUBJECT],false,true,true,true)])] - I have other scripts though where I cannot remove all other things than the text itself, so they will be a bit more tricky I guess.

    Thanks

    Ghita

    0
    Comment actions Permalink
  • Avatar
    Mathias Balsløw

    Hi Ghita,

    Yeah, I was about to write the same. I would approach it similar to what I do in the video. I cannot recreate the issue, but the best and easiest way of figuring out exactly what is going on is by splitting everything up into separate actions.

    VIDEO: https://www.screencast.com/t/t9XrkBzjnW

    I could even split it up into more actions, one "Formula" actions per formula instead of embedding them. I know that makes your script longer, but then you can see exactly what is going on and make sure that your variable has the expected value heading into the if-statement.

    0
    Comment actions Permalink

Please sign in to leave a comment.