Print Page | Close Window

[SOLVED] IF for message subject not working

Printed From: Parker Software Ltd
Category: ThinkAutomation Business Process Automation
Forum Name: ThinkAutomation Version 4
Forum Description: For questions relating to ThinkAutomation Version 4
URL: http://www.parkersoftware.com/forum/forum_posts.asp?TID=9352
Printed Date: 18 Nov 2018 at 12:49am
Software Version: Web Wiz Forums 11.05 - http://www.webwizforums.com


Topic: [SOLVED] IF for message subject not working
Posted By: AlexUhde
Subject: [SOLVED] IF for message subject not working
Date 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



Replies:
Posted By: parkersoft-jim
Date 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" rel="nofollow - https://www.thinkautomation.com/downloads.aspx


Posted By: AlexUhde
Date 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


Posted By: parkersoft-jim
Date 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.


Posted By: AlexUhde
Date 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:



Posted By: parkersoft-jim
Date Posted: 12 Jan 2018 at 2:12am
Did deleting and creating the trigger again correct how it is reporting in the logs?


Posted By: AlexUhde
Date 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


Posted By: parkersoft-jim
Date 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?


Posted By: AlexUhde
Date 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


Posted By: parkersoft-jim
Date 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.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.05 - http://www.webwizforums.com
Copyright ©2001-2016 Web Wiz Ltd. - https://www.webwiz.co.uk