- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-14-2021 03:50 AM
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');
}
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-14-2021 04:03 AM
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
2022-25 ServiceNow Community MVP

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-14-2021 03:52 AM
Hi there,
What's the issue you are having? Can you share what you tried and is not working?
If my answer helped you in any way, please then mark it as helpful.
Kind regards,
Mark
2020, 2021 ServiceNow Community MVP
2020, 2021 ServiceNow Developer MVP
---
LinkedIn
Community article, blog, video list
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-14-2021 03:57 AM
Hello,
Please use != in place of ==.
else if (requestType == 'resignation' && marketChoice != 'Other' && site.toLowerCase().indexOf('telecom') > -1) { g_form.setValue('request_template', 'EUC Task Fulfilment,RTM');}
Regards,Alok Gupta
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-14-2021 04:02 AM
Hi Alok
the first 2 conditions will remain the same ,just the last condition should not contain the word 'telecom'
site.toLowerCase().indexOf('telecom') > -1)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-14-2021 04:05 AM
Then use ==-1 then it will work.
You can use this condition (indexOf returns -1 if the word is not found)
site.toLowerCase().indexOf('telecom') == -1