The Zurich release has arrived! Interested in new features and functionalities? Click here for more

Client Script - How to check value using starts with or contains.

lindac
Kilo Explorer

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.

2 REPLIES 2

john_roberts
Mega Guru

You can use indexOf to search a string value. There's an example in the wiki.


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)