How to set a condition in a Change approval notification? SM 9.34

Hi experts,  i'm trying to use a different html template in a notification depending on the ECAB approval group name. There are many ECAB approval groups and the name of the ECAB group contains the ECAB string

The example is:

Msg Class : HTMLTemplate

Arguments : jscall( "htmlemailtemplates.getMailBody", "TC_cm3r.approval.Solicitud Aprobación", $L.file, $L.file.save)

Condition : approval.status in $L.file="pending" and not(current.pending.groups in $L.file like"ECAB") and not (same(current.pending.groups in $L.file, current.pending.groups in $L.file.save))

Then another entry for :

Msg Class : HTMLTemplate

Arguments : scall( "htmlemailtemplates.getMailBody", "TC_cm3r_EMERGENCIA.approval.Solicitud Aprobación", $L.file, $L.file.save)

Condition : approval.status in $L.file="pending" and (current.pending.groups in $L.file) like "ECAB" and not (same(current.pending.groups in $L.file, current.pending.groups in $L.file.save))

Well, it's not working.  Please ¿would you give any suggestion?

Thanks in advance.

  • Hello Norita,

    hope you are doing fine.

    please let me make the proper test and ib=nvestigation due this concern and soon I will be back to you.

     

  • Hello Norita,

    hope you are doing well.

    could you please let me know what template should I use and the steps I need to follow please?

     

  • Hi Carlos,  I apologise if I've wrote a confused explanation. I just need a suggestion of a condition to evaluate if current.pending.groups starts with or contains de ECAB string

    I'm attaching how is configured de  notification: id="ChM Change Approval_1"

    It has 2 conditions that uses the same HTML template  : TC_cm3r.approval.Solicitud Aprobación

    jscall( "htmlemailtemplates.getMailBody", "TC_cm3r.approval.Solicitud Aprobación", $L.file, $L.file.save)

    The 2 conditions are (as seen in imagen_nro_1):

    approval.status in $L.file="pending" and not (same(current.pending.groups in $L.file, current.pending.groups in $L.file.save))

    approval.status in $L.file="pending" and same(current.pending.groups in $L.file, current.pending.groups in $L.file.save) and lng(current.pending.groups in $L.file)=lng(aprobadores.nominales in $L.file)

    I want to use another HTML template : TC_cm3r_EMERGENCIA.approval.Solicitud Aprobación  when the current.pending.groups  starts with  or  contains  the  ECAB string  because  in our SM there are 554 ECAB approval groups and 67 TCAB approval groups, the HTML template send by email must be different  (as seen in imagen_nro_2)

    These are the 4 new conditions I've tried (instead of the 2 conditions I've told at the beggining of this message) but something is wrong (a and b  with HTML template TC_cm3r.approval.Solicitud Aprobación  .  c y d with HTML template TC_cm3r_EMERGENCIA.approval.Solicitud Aprobación).

    Condition a) approval.status in $L.file="pending" and not(current.pending.groups in $L.file like"ECAB") and not (same(current.pending.groups in $L.file, current.pending.groups in $L.file.save))

    Condition b) approval.status in $L.file="pending" and not(current.pending.groups in $L.file like"ECAB") and same(current.pending.groups in $L.file, current.pending.groups in $L.file.save) and lng(current.pending.groups in $L.file)=lng(aprobadores.nominales in $L.file)

    Condition c) approval.status in $L.file="pending" and (current.pending.groups in $L.file) like "ECAB" and not (same(current.pending.groups in $L.file, current.pending.groups in $L.file.save))

    Condition d) approval.status in $L.file="pending" and (current.pending.groups in $L.file like"ECAB") and same(current.pending.groups in $L.file, current.pending.groups in $L.file.save) and lng(current.pending.groups in $L.file)=lng(aprobadores.nominales in $L.file)

    Thanks in advance.

  • Verified Answer

    Hi,
    Can you please share if your issue is resolved ? If yes then you can post the answer your for others to help too. If not then you can log a case with HP Software support to look into it further.

    Regards,
    HPE Software Support

  • Verified Answer

    Hi,
    Can you please share if your issue is resolved ? If yes then you can post the answer your for others to help too. If not then you can log a case with HP Software support to look into it further.

    Regards,
    HPE Software Support