Custom Variable Editor not showing in Workspace SOW

Nicol_s2
Tera Expert

Hello,

 

I wanted to hide the Variable Editor in RITM for every user except for HR for an specific Item with sensitive info.

For that, I created a custom Variable Editor with an evaluator that grant access depending on the user's roles.

In the backend is working just fine.

 

But in SOW is not working. I replaced the oob one with the custom formatter but it is not showing at all. It is not even reaching the evaluator. It seems that SOW only displays the oob Variable Editor.

 

Any idea how can I solve this?

2 REPLIES 2

sharayuw17
Tera Contributor

Hello Nicol,

Did you got the solution for it since I am facing the same issue, I am am not able to see the custom variable editor in the SOW.

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.