How to check if a property has a value in a script include?

User205031
Tera Contributor

Hi All,

I have a system property which has value of an email address.

Now an incident will be created if the recipient is the above email address.

 

We have created a script include where we have called the system property. Now I need to check if the system property matches with the above value then only it will create an incident.

 

Please help!

1 REPLY 1

RaghavSh
Kilo Patron

Have you called your script include in inbound action? if yes you can can pas email.from in your script include function like blow:

Inbound:

new SI().function_name(email.from.toString());

 

Script include:

 function_name : function(email)

{

if(email==gs.getProperty('property_name'))

{

// code to create incident.

}

}


Please mark the answer correct/helpful accordingly.


Raghav
MVP 2023