Parker Software Ltd Homepage
Forum Home Forum Home > ThinkAutomation Business Process Automation > ThinkAutomation Version 4
  New Posts New Posts RSS Feed - [SOLVED] IF for message subject not working
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

[SOLVED] IF for message subject not working

 Post Reply Post Reply
Author
Message
AlexUhde View Drop Down
New User
New User


Joined: 26 Dec 2017
Location: Brisbane
Points: 18
Post Options Post Options   Thanks (0) Thanks(0)   Quote AlexUhde Quote  Post ReplyReply Direct Link To This Post Topic: [SOLVED] IF for message subject not working
    Posted: 10 Jan 2018 at 3:29am
Hello,

I'm trying to filter an email subject, based on a combination of words, but i always get the message that it's "False"

Subject would be: PRTG,1550,System Health (System Health),Probe Device (BRI-DC01), Warning,17405
the IF should filter if Subject contains either "System Health" or "Probe Health".

The IF statement:


and the log shows:


as a test I tried to assign the variable %message_subject% the %msg_subject% instead of using it directly. But that hasn't changed anything.
First I tried to use the "End Processing" action, but it has the same result.

Can anyone point me in the right direction?
Thank you!

Kind regards,
Alex


Edited by AlexUhde - 15 Jan 2018 at 10:21pm
Back to Top
parkersoft-jim View Drop Down
Admin Group
Admin Group
Avatar

Joined: 11 Nov 2016
Location: Terra
Points: 130
Post Options Post Options   Thanks (0) Thanks(0)   Quote parkersoft-jim Quote  Post ReplyReply Direct Link To This Post Posted: 10 Jan 2018 at 5:08am
Hi Alex,

We have made changes to how the logging on logic occurs so with this in  mind if you're not using ThinkAutomation 4.2.1634 already could you please update via the below URL;

https://www.thinkautomation.com/downloads.aspx


Edited by parkersoft-jim - 11 Jan 2018 at 6:18am
Back to Top
AlexUhde View Drop Down
New User
New User


Joined: 26 Dec 2017
Location: Brisbane
Points: 18
Post Options Post Options   Thanks (0) Thanks(0)   Quote AlexUhde Quote  Post ReplyReply Direct Link To This Post Posted: 10 Jan 2018 at 5:21pm
Hello Jim, 
I upgraded last night to Version 4.2.1634 but no change, it still Evaluates it as False.

Kind regards,
Alex
Back to Top
parkersoft-jim View Drop Down
Admin Group
Admin Group
Avatar

Joined: 11 Nov 2016
Location: Terra
Points: 130
Post Options Post Options   Thanks (0) Thanks(0)   Quote parkersoft-jim Quote  Post ReplyReply Direct Link To This Post Posted: 11 Jan 2018 at 5:18am
I'm not able to replicate your problem on my newly created test triger action.

It should put each condition on a seperate logging line in the trigger process log.

Eg
False first condition
True second contition

Try deleting the trigger action and manually creating it again.
Back to Top
AlexUhde View Drop Down
New User
New User


Joined: 26 Dec 2017
Location: Brisbane
Points: 18
Post Options Post Options   Thanks (0) Thanks(0)   Quote AlexUhde Quote  Post ReplyReply Direct Link To This Post Posted: 12 Jan 2018 at 12:13am
Hello Jim,
I have this.
Here is a more detailed view of this steps:
the IF:


the condition:

Back to Top
parkersoft-jim View Drop Down
Admin Group
Admin Group
Avatar

Joined: 11 Nov 2016
Location: Terra
Points: 130
Post Options Post Options   Thanks (0) Thanks(0)   Quote parkersoft-jim Quote  Post ReplyReply Direct Link To This Post Posted: 12 Jan 2018 at 2:12am
Did deleting and creating the trigger again correct how it is reporting in the logs?
Back to Top
AlexUhde View Drop Down
New User
New User


Joined: 26 Dec 2017
Location: Brisbane
Points: 18
Post Options Post Options   Thanks (0) Thanks(0)   Quote AlexUhde Quote  Post ReplyReply Direct Link To This Post Posted: 15 Jan 2018 at 1:49am
Hello Jim,

So far no change.
I split it out in two IF-Statements, but no change



The log shows:


I upgraded to Version  4.2.1634 before the changes.

Kind regards,
Alex
Back to Top
parkersoft-jim View Drop Down
Admin Group
Admin Group
Avatar

Joined: 11 Nov 2016
Location: Terra
Points: 130
Post Options Post Options   Thanks (0) Thanks(0)   Quote parkersoft-jim Quote  Post ReplyReply Direct Link To This Post Posted: 15 Jan 2018 at 9:06am
All I can think of at the moment is that for some reason the text you're expecting isn't in the message_subject variable.

I see you are setting this to contain what is in msg_subject.

msg_subject is a built-in variable and literally takes what is in the Subjct part of message headers.

Could you test to see if things are going into this defaul variable correctly by stting a trigger action to write a text file with %msg_subject% as the body of the text file?
Back to Top
AlexUhde View Drop Down
New User
New User


Joined: 26 Dec 2017
Location: Brisbane
Points: 18
Post Options Post Options   Thanks (0) Thanks(0)   Quote AlexUhde Quote  Post ReplyReply Direct Link To This Post Posted: 15 Jan 2018 at 10:21pm
Hello Jim,
Thank you for your help.
The issue where the Quotes...
So I searched for "System Health" but the subject contained (System Health) (see screenshot in the post before.
So removing the quotes from the if statement fixed the issue.

Kind regards,
Alex
Back to Top
parkersoft-jim View Drop Down
Admin Group
Admin Group
Avatar

Joined: 11 Nov 2016
Location: Terra
Points: 130
Post Options Post Options   Thanks (0) Thanks(0)   Quote parkersoft-jim Quote  Post ReplyReply Direct Link To This Post Posted: 16 Jan 2018 at 11:15am
Sorry, I was under the impression your subject did infact contain quotes.

For future reference, the 'contains' will look at the actual characters, including quotes and what-not'.

So basically only put them in if they are actually present in the subject.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.05
Copyright ©2001-2016 Web Wiz Ltd.

This page was generated in 0.102 seconds.