How to check if a property has a value in a script include?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-04-2023 03:43 AM
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!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-04-2023 05:54 AM
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