Welcome to Community Week 2025! Join us to learn, connect, and be recognized as we celebrate the spirit of Community and the power of AI. Get the details  

How to add Variable Editor to Configurable Workspace for a custom table?

Tomasz Sienkie1
Tera Contributor

Hi, I'm trying to show the Variable Editor for a custom table extending Task. 

 

So far, no luck... I am starting to think that variables are not supported in custom Configurable Workspaces? It is odd since that is a core system functionality, e.g. HR Agent Workspace displays a variable editor within record form.

What I did so far:

1. Created new scoped app with a table extending Task

2. Created a Record Producer with 3 sample variables (text, reference)

3. Created a basic Workspace in App Engine Studio.

when I try to show the record on the workspace form, it shows no variables.

 

I even tried creating a formatter and adding it to the form, this works for core UI but not for workspace.

Maybe there is some hidden setting that I have missed? I also cannot see any UIB Component relevant for variables...

Thanks for any pointers!

 

6 REPLIES 6

JakeJake
Tera Contributor

Any update on this?

garyopela
ServiceNow Employee
ServiceNow Employee

Ahh, I found it. 

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB2199466

 

So, the custom UI Macro has to be in the Global Scope, it won't work if it's in a scoped app. Also, the name of the custom UI Macro MUST start with com_glideapp_servicecatalog_veditor. Then you can add something to the end of it. I think this is why it has to be global, because if it's scoped, then it puts the scope name in front of it. Apparently workspace only works with formatters who call UI Macros that start with com_glideapp_servicecatalog_veditor. So, you'll have a UI Formatter that points to this UI Macro. After you do this, you'll need to remove the variable editor and then re-add it.

 

I tested this, and I thought it didn't work at first. However the crazy thing is that the variable was there. It just didn't look like a variable editor, it looked like a normal field. Pretty slick.

Thanks for the update, however it does not seem to work for other formatters than the com_glideapp_servicecatalog_veditor. What Tomasz and I are looking for is for the com_glideapp_questionset_default_question_editor to be shown on a configurable workspace. The com_glideapp_questionset_default_question_editor is for other tables then the sc_req/sc_req_item tables. This still does not work on the workspace.

Hi @JakeJake and @Tomasz Sienkie1 ,

were you able to resolve this? I am facing the same issue.