This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Can't get the If statement to work in a notification.

Hello,

I'm trying to have my notification template use an if statement. What am I doing wrong? The code is reading the variable.

This is my test code:

The Platform is :$FIELDVALUE(Platform)

$IF(Platform, M8)

This is an M8 Install.

$ELSE()

This is not an M8 Install.

$ENDIF()

*****************************************************************************************************************************

Output is:

The Platform is:M8

This is not an M8 install.

'************************************************************************************************************************8

The output is incorrect as far as I'm concerned.

Is this something I need to do to make the the if statement work?

Regards,

WIll

Parents Reply
  • 0 in reply to 

    What are the "Platform" and "M8" values??  The "$IF()" tag has a specific set of things it can do.  AFAIK, comparing Fields and values is not one of them, except for the ITEMTYPE field.

Children
  • 0 in reply to 

    Thank you for your help. The platform field has values of "M5" or "M8". Its just a random single selection field. Ok, if your saying it will only work with ITEMTYPE I can live with that. I attempted the same exercise with ITEMTYPE field however I'm confused. Is the "ITEMTYPE" field now "ISSUETYPE"? Do I use the database field name or the Field name? Do I have to rename ISSUETYPE to ITEMTYPE? Or just create an "ITEMTYPE" field? Or, should I use the Field Name or the Database Field name? I've tried both ISSUETYPE database name and the  Item Type field name, both failed to trigger the IF logic.

    My issuetype its named ISSUETYPE in my project.

    Here's my new test code:

    The ISSUETYPE is: $FIELDVALUE(ISSUETYPE)

    $IF(ISSUETYPE, Oracle)

       This is an Oracle issuetype.

    $ELSE()

      This is not an Oracle Issue Type.

    $ENDIF()

    *****************************************************************************************************

    Results:

    The ISSUETYPE is: Oracle

    This is not an Oracle ISSUETYPE.

    *****************************************************************************************