Can't hide fields in service operations workspace with client script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2024 02:26 PM
So i have these fields that i need to hide when i open a certain task or RITM but the problem is the script just keep getting ignored. It works in the default view but it doesn't work in the Service Operation Workspace
in workspace
In the default view
And here is my catalog client script. I already tried to use "g_form.setDisplay('variables.vs_login')" since the field is in the variables section but it didn't work.
function onLoad() {
var shortDescription = g_form.getValue('short_description');
if (shortDescription == 'Analisar solicitação') {
g_form.setDisplay('vs_login', false);
g_form.setDisplay('vs_email_task', false);
g_form.setDisplay('vs_password', false);
}
}
- Labels:
-
Service Operations Workspace

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2024 06:01 PM
In your client script, have you set the UI Type field to All ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-29-2024 07:47 AM
Yes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2024 07:34 PM
Hi @Jo_o Pedro ,
You are good with the code and make sure your UI Type is selected as "All".
Now, you will need to create Workspace View Rule to expose the fields.
Please refer to these threads :
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-29-2024 01:20 PM
It didn't work. But my coworker found out that the script works when using "indexOf"