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.

Script to show associate server's names for the solution selected

Bindhu1
Tera Contributor

Hi Team, kindly assist here.
I am trying to fetch associated server's name in variable(multi line text) for the solution selected , kindly help me with the code.
I have 2 questions on cat item:

Bindhu1_0-1713936821894.png

Bindhu1_1-1713936821897.png

Q1. referring to Solution table[cmdb_ci_service]

Q2. referring to Server table [cmdb_ci_server]
Based on the solution select in Q1 , New variable xyz(multi line text) should give associated server's name
-----------------------------------------------------------------------------------------------------
Tried with below approach but not required anymore:
Since there is no direct relationship btw servers and solution ,I had given reference table of Q2 to cmdb_rel_ci , with  advance ref qualifier as below:

Bindhu1_2-1713936821898.png

 

output:

Bindhu1_3-1713936821901.png

Bindhu1_4-1713936821900.png

 

 

Thanks in advance

1 REPLY 1

Swamy Malluri
Tera Guru

Hi @Bindhu1 ,

 

Try to build move your logic to script include and return the sys ID which qualified your condition.

Query cmdb_rel_ci in script include with selected service in Q1 and return Serv CIs as result to reference qualifier field.

 

If I could help you with your Query then, please hit the Thumb Icon and mark as Correct !!

Thank you