Skip to main content

I’ve found the article on how to put some nifty customisations on the Sysaid notifications, and it allows us to do a “not” and “equals” check - e.g.:

#if( ${Status}==”In Progress” )

#if( ${Solution}!="" )

However, I was wondering - does the system support “contains” or “like” operators?

 

I was hoping to do something along the lines of:

#if( ${Description} like "*forgot my password*" && ${Description} like "*SystemX*" )

    <p>Did you Know? You can hit the ‘forgot my password’ link in SystemX to reset it? View the How-To article here: <a>link</a></p>

#end

Hi @james.reynolds 

The notifications are written in Apache Velocity language check the supported operators here: 

https://velocity.apache.org/engine/1.7/user-guide.html#relational-and-logical-operators

Cheers,

 

 


Thank you.
 

This is an example of what worked:

    #if($Description.indexOf("telephone") > 0)
        contains telephone
    #end

 

Here’s an alternative method which might be useful

    #set($myString = ${Description}) 
    #if($myString.indexOf("telephone") > 0)
        contains telephone
    #end


Thanks @james.reynolds for sharing the love!!

 


Reply