Topic
  • 3 replies
  • Latest Post - ‏2014-04-16T04:08:22Z by CQAdmin
Tawada
Tawada
2 Posts

Pinned topic Help to use Expression Tags in EmailPlus Template

‏2014-04-11T22:29:23Z |

Hi,

 

One of my customers is trying to generate an EmailPlus template and they get an error on validation of the email template body when trying to use an "Expression tag". They have a record type named "RA" which has a field named "Associated_STR" of type REFERENCE_LIST. The REFERENCE_LIST are records of type STR. In the expression they are able to get the list of STR ids by using the "substitution tag" #?Associated_STR?# which returns a reference to an array. They'd the link to loop of this list and get the "Title" field of each STR record. The script fails to validate:

 

These fields have invalid values:
Email Template Body...
CRMUD0062E The field "Email Template Body" got a failure from its validation hook. The error message is:
The following substitutions are invalid: EXPRESSION invalid:
use CQPerlExt:
$rc ="";
$sessionobj = $entity ->GetSession();

my $str)ref = [ 'TR00000001' ];
MY @STRS = @{$str_ref};
my $idx = 0;

foreach $str (@strs)
{
   $rc = $rc , " ",$sessionobj ->GetEntity("STR",
$str)->GetFieldValue("Title")->GetValue(),"\n";
}

$rc;
Error: CRMCU0027E An erro was detected retrieving information from
the ClearQuest database.
There is a reference to an object that does not exist:
 Object Type: Entity
 Object: CRMUD0131e "33554433" of the record type "STR"
This error was detect at: ClearQuest Core:adentitymgr.cpp:1002
Recommendation: If you cannot determine how to resolve this issue,
contact Rational Support and provide all the above information as well
as a description of the context in which the message occurred. at (eval
33) line 12.

 

If they replace the "$str" parameter in the "GetEntity" with a hard-coded value fo a record that exists (e.g., TR00035901) the script validates and the email works.

Please let me know if you see something wrong with the syntax being used, and/or you have any tips to get this working.

 

Thanks,

 

  • CQAdmin
    CQAdmin
    103 Posts

    Re: Help to use Expression Tags in EmailPlus Template

    ‏2014-04-15T03:08:33Z  

    Error: CRMCU0027E An erro was detected retrieving information from
    the ClearQuest database.
    There is a reference to an object that does not exist:
     Object Type: Entity
     Object: CRMUD0131e "33554433" of the record type "STR"

     

    To resolve this issue; you should login to the back end database and use SELECT query to find out "33554433" and then DELETE the same.

    Expression Tag examples-

    http://pic.dhe.ibm.com/infocenter/cqhelp/v8r0m0/index.jsp?topic=%2Fcom.ibm.rational.clearquest.schema.ec.doc%2Ftopics%2Fsch_pkgs%2Fr_emp_expression_tag_examples.htm

    https://publib.boulder.ibm.com/infocenter/ieduasst/rtnv1r0/index.jsp?topic=/com.ibm.iea.rcq/rcq/7.1/Operations/RCQ_EmailPlus/player.html

     

     

  • Tawada
    Tawada
    2 Posts

    Re: Help to use Expression Tags in EmailPlus Template

    ‏2014-04-16T01:24:08Z  
    • CQAdmin
    • ‏2014-04-15T03:08:33Z

    Error: CRMCU0027E An erro was detected retrieving information from
    the ClearQuest database.
    There is a reference to an object that does not exist:
     Object Type: Entity
     Object: CRMUD0131e "33554433" of the record type "STR"

     

    To resolve this issue; you should login to the back end database and use SELECT query to find out "33554433" and then DELETE the same.

    Expression Tag examples-

    http://pic.dhe.ibm.com/infocenter/cqhelp/v8r0m0/index.jsp?topic=%2Fcom.ibm.rational.clearquest.schema.ec.doc%2Ftopics%2Fsch_pkgs%2Fr_emp_expression_tag_examples.htm

    https://publib.boulder.ibm.com/infocenter/ieduasst/rtnv1r0/index.jsp?topic=/com.ibm.iea.rcq/rcq/7.1/Operations/RCQ_EmailPlus/player.html

     

     

    Hi,

    It seems like  that the problem here is that the PERL expression is validated against the EmailPlusTemplate record type and not against the RA record type. Obviously the EmailPlustemplate record type does not have a reference list to Associated_STR and this triggers the error. Simple as it is, it is also not what many customers expect from the Expression tag feature according to the original EmailPlus documentation.

    Thank you very much for your quick response, I appreciate your help!
     

     

  • CQAdmin
    CQAdmin
    103 Posts

    Re: Help to use Expression Tags in EmailPlus Template

    ‏2014-04-16T04:08:22Z  
    • Tawada
    • ‏2014-04-16T01:24:08Z

    Hi,

    It seems like  that the problem here is that the PERL expression is validated against the EmailPlusTemplate record type and not against the RA record type. Obviously the EmailPlustemplate record type does not have a reference list to Associated_STR and this triggers the error. Simple as it is, it is also not what many customers expect from the Expression tag feature according to the original EmailPlus documentation.

    Thank you very much for your quick response, I appreciate your help!
     

     

    My Pleasure.

    :-)