IBM Support

Limiting the size of an email generated by EmailPlus template rule

Question & Answer


Question

Using EmailPlus template rules, how can I place a limit on the size of my generated email?

Answer

IBM Rational ClearQuest EmailPlus using template rules to construct a ClearQuest email gives you flexibility on what goes into the email body and the formatting of the email. Using EmailPlus template rules, you can easily construct an email that contains values of your ClearQuest record. This powerful capability can sometimes lead to an email body being too large, or containing too much data for the intended recipient. For example, using the EmailPlus meta-tag:

  • #?Notes_Log?#

will include the entire content of the ClearQuest field Notes_Log. This is OK if the field does not have a lot of data, but may not be helpful in most cases if the content is too large as it will span pages before any other data after the Notes_Log appears in the email body. You can limit how much of this data appears in the email body by using EmailPlus's EXPRESSION keyword like so:

  • #@EXPRESSION::substr(#?Notes_Log?#, 1, 50)@#

This will extract the first 50 characters of the Notes_Log field instead of the entire content, thus limiting how much data is included in the email generated by EmailPlus. You can use the same principle on any other field to which you want to limit how much data to include.

[{"Product":{"code":"SSSH5A","label":"Rational ClearQuest"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Not Applicable","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"8.0;8.0.0.1;8.0.0.2;8.0.0.3;8.0.0.4;8.0.0.5;8.0.0.6;8.0.0.7;8.0.0.8;8.0.1;8.0.1.1","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}},{"Product":{"code":"SSSH5A","label":"Rational ClearQuest"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Not Applicable","Platform":[{"code":"","label":""}],"Version":"","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
17 March 2021

UID

swg21650960