How can i script Contains("string") or matching
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-16-2014 07:40 AM
Below script don't works, what is de function contains in SN
if(this.rec.u_service.containg("SAM") && this.rec.u_subtype == ""){
allowed = true;
}
Maby something like indexOf
Thanks!
- Labels:
-
Service Mapping

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-20-2014 08:32 AM
Excellent, thanks for the update! Please remember to mark the thread as resolved.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-05-2016 02:17 PM
Hello Dalab,
I am having similar issue you had earlier. I have Reference Type catalog variable. The backgroundColor of the variable should be styled to Green color if the name contains "green" .
for example: #Client Script
var myVar = $('sys_display.'+ g_form.getControl('<variable_name>').id);
if(the variable contains(green))
{
myVar.style.backgroundColor = 'green';
}
Could you please help me writing the condition?
Thank You