We're reclaiming inactive PDIs to keep them available for active builders. Learn what's changing, who's affected, and how to protect your work. Read More

indexof client script

levino
Giga Guru

Hi there

 

i need another 'else if '  conditon which is the opposite fo the below

that is the  'site  does not  contain the word telecom'

Thanks

Levino

 

 

else if (requestType == 'resignation' && marketChoice == 'Other' && site.toLowerCase().indexOf('telecom') > -1) {
    g_form.setValue('request_template', 'EUC Task Fulfilment,RTM');
}
1 ACCEPTED SOLUTION

Voona Rohila
Tera Patron

You can use this condition (indexOf returns -1 if the word is not found)

site.toLowerCase().indexOf('telecom') == -

 


Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Rohila V
5x ServiceNow MVP

View solution in original post

5 REPLIES 5

Voona Rohila
Tera Patron

You can use this condition (indexOf returns -1 if the word is not found)

site.toLowerCase().indexOf('telecom') == -

 


Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Rohila V
5x ServiceNow MVP