Auto-Populate Description field of Incident Record form, if Priority is 1 or 2

Sam196
Kilo Expert

I am new to client scripts, so if someone can provide a step-by-step answer it would be very helpful for me. Thanks in advance.

Problem: If the agent/caller selects "Priority 1 or Priority 2," the "Description" field needs to dynamically change from an empty box to:

[

Name: 

Number:

system:

Headingxx:

Heading88x:

]

Even better if these dynamic texts are bolded, so the caller entered content is regular text (not bolded). This would make it easier for incident handlers to read through. Again, a step-step explanation is much appreciated. Thank you!

 

find_real_file.png

1 ACCEPTED SOLUTION

Sam196
Kilo Expert

Thank you all for the tips and suggestions. This is what I did, and it is working fine. I don't think I can make the text bold since my description field is Type: String. (scratched out in red is just the text and I used the \n to separate the lines)

 

find_real_file.png

View solution in original post

5 REPLIES 5

Hi @Sam

Glad that my comment helped. 

I think you can optimise the script. Instead of taking value of Priority field like this.

Set priority field under Field Name on OnChange client script and then below in if just check (newValue == 1 || newValue == 2)

Then setValue

find_real_file.png

Hope this helps 

Thank you
Prasad