- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-30-2023 11:41 PM
Hi All,
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-31-2023 12:32 AM - edited 10-31-2023 12:33 AM
Try below.
var wsOptions4 = 'BR,SF,GI';
var splitis=wsOptions4.split(',');
var identifer = g_form.getValue('current_shift_identifier');
for(var i=0;i<splitis.length;i++){
if (identifer.substring(0,2)==splitis[i]) {
g_form.setVisible('test',true);//true,false to show/hide
}
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-31-2023 12:16 AM
You want it to when when wsOptions4 is either BR, SF or GI?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-31-2023 12:21 AM
yes ,one of the option

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-31-2023 12:32 AM - edited 10-31-2023 12:33 AM
Try below.
var wsOptions4 = 'BR,SF,GI';
var splitis=wsOptions4.split(',');
var identifer = g_form.getValue('current_shift_identifier');
for(var i=0;i<splitis.length;i++){
if (identifer.substring(0,2)==splitis[i]) {
g_form.setVisible('test',true);//true,false to show/hide
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-31-2023 12:13 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-31-2023 12:02 AM
Hi @chandan31
you can try with startswith() like this
var wsOptions4 = 'BR';
var identifer = g_form.getValue('current_shift_identifier');
if (identifer.startsWith(wsOptions4)) {
g_form.setVisible('test',true);
}