Client Script - How to check value using starts with or contains.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-11-2007 07:14 AM
I need to modify a client script that is currently checking the category field for a specific value. I need to change that to check the field using a starts with or contains.
Is there a way to do this?
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-11-2007 06:40 PM
You can use indexOf to search a string value. There's an example in the wiki.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-12-2007 05:21 AM
Thank you for the update. I did see that when I searched the wiki site but did not know what it meant. With SN assistance, I am able to do the following:
if (incident_u_user_experience_category.toString().indexOf('CSM') == 0)