Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Alternative for Macro in Agent Workspace

Jean Ferreira
Giga Guru

I have a kind of hierarchy table, then I have a hierarchy tree.


For instance:

Level 1
Level 1.1
Level 1.1.1
Level 1.2
Level 2
Level 2.1
Level 2.2
Level 2.21
Level 2.2.2

Then the Configuration Items have one level hierarchy, for instance:
Server A is Level 2.2.2.


So, in the Server form I have 1 field to show the level hierarchy and a Formatter with UI Macro to show the hierarchy tree related the level hierarchy

 

Screenshot 2024-06-06 at 11.59.28.png

 

But when I open the same record in Agent Workspace my Formatter and Macro don't appear.

Screenshot 2024-06-06 at 12.05.59.png

 

Is there any workaround for this?

1 REPLY 1

Jean Ferreira
Giga Guru

I was able to by pass with a solution.
It was not what I needed and I wanted. But it was what I thought and ServiceNow provided as a solution in a Hi_ticket.

 

Basically I created a Client Script to call my Script include and get the string hierarchy tree.

Then I used the function

 
g_form.showFieldMsg('field', 'Message');

 

Here is how it looked like.

Screenshot 2024-06-10 at 14.48.41.png