Can I set some variables in multiple line text field?

Kohei4
Giga Expert

Hi,
I would like to set some variables in CI comment field in multiple lines during discovery.
I know there is "Set Parameter Value" operation in the pattern designer.
Can I set variables in multiline text like below?
<Comment field>
 Variable A: xxxxxx
 Variable B: yyyyyy
 Variable C: zzzzzz

find_real_file.png

1 ACCEPTED SOLUTION

SiD2
ServiceNow Employee
ServiceNow Employee

Hi,

You can definitely have multi line text i guess, but the pattern designer doesn't have direct capability. So you need to use eval scripts to format the multi line text.

In the same step in Value field, type EVAL() and then you get edit option beside and then select "Other" in top right for groovy code.

Please refer the 2nd example in groovy section in below KB and you can add multi line text accordingly.

 

Please refer this KB article in how to write eval scripts.

https://hi.service-now.com/kb_view.do?sysparm_article=KB0647736

Please mark Helpful / Accept Solution so that it helps others with similar questions.

View solution in original post

5 REPLIES 5

Ashutosh Munot1
Kilo Patron
Kilo Patron

+1 to Sid.

 

-Ashutosh