- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-02-2025 04:11 AM
Hi
Does anyone know how to access variable fields in Request Item / Catalog Task on Service Operations workspace when checking using a UI Action > Workspace client script
The traditional way of accessing variables doesnt seem to work in workspace.....
i.e. Native
g_form.getValue('variables.VARIABLE_NAME')
Workspace
??
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-03-2025 02:55 AM
Hi - ok so we have figured out that we will need to hide the UI Action button in SOW through UI Action visibility as the logic in native UI Action will not work the same way in Workspace without serious rework (i.e. using GlideAjax to do the logic to check if all variables are filled in etc)
Then we are going to create a Declarative Action (DA) to mimic the same behavior in Workspace and set that visible on the SOW form.
Thanks for your help.
It does seem that reworking complex UI action scripts in SOW is very difficult and therefore using DA to do the same logic for workspace seems the right approach.
Agree?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-02-2025 07:10 AM
Hi @mattburgess ,
use the GlideAjax way.
Please mark my answer as helpful/correct if it resolves your query.
Regards,
Chaitanya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-03-2025 01:40 AM
Hi Chaitanya,
Thanks for the update.
I was also wondering once we retrieve the variable values how can we then mark those variables as mandatory on the SOW form with red line around the field in a workspace client script
i.e.
g_form.setMandatory('variables.VARIABLE_NAME');
We need basically to copy the same behaviour inside the UI Action workspace client script that happens on UI Action Client script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-03-2025 02:32 AM
you want it to be done in client script or UI action?
I believe it should be accessible from UI action as well since it's accessible from client script as per my above post.
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-03-2025 02:14 AM
So you are saying normal client script on RITM table is not able to access variable value using below syntax?
g_form.getValue('variables.variableName');
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader