Removing “commands” from subject line commands regardless of spelling

iQ.Suite Tips & Tricks for IBM Domino

You are using a rule with a special command, e.g. “<command>”.

(see Tips and Tricks December 2009)

Tip 5. Sep, 2011

 

But users won’t always write it the way you ask them to. For example, users may write “<command>”, “<Command>”, “<COMMAND>”or under some circumstances even “<comMand>”.

Tip 5. Sep, 2011

When evaluating the rule, it doesn’t matter how the key word is written.

To remove it, you need an Action Mail Job, which only runs when the corresponding command rule applies.

Tip 5. Sep, 2011

 

Tip 5. Sep, 2011

 

The job has the following structure

_command := "<command>";
_Field := "Subject";
_Value := Subject;

The green texts are the key word you used and the field in which you are querying it.

_low := @LowerCase(_Value);

The field content is “standardized” here

_left := @Left(_low;_command);
_length_left := @Length(_left);
_right := @Right(_low;_command);
_length_right := @Length(_right);

The position of the key word within the field is determined here

_LeftNew := @Left(_Value;_length_left );
_RightNew := @Right(_Value;_length_right );

The text on the left and right of the key word is deleted

_new := @Trim(_LeftNew+ _RightNew);
_out := @If(_new = "" ;_Value;_new);

The new field value is formed from the left and right parts.

@SetField(_Field;_out);

This value is returned to the field.

@Success

Required for the Notes formula to work.

And now the e-mail will have the right appearance.

Tip 5. Sep, 2011

Go Back