- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-17-2022 08:15 AM
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!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-17-2022 10:05 AM
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)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-17-2022 08:18 AM
Hi Sam,
You can create OnChange Client script which should work on Field as 'Priority'
In code you can use if(newValue == '1' || newValue == '2'){g_form.setValue('Your Description');}
Hope this helps
Thank you
Prasad
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-17-2022 08:25 AM
Hi Prasad - Thank you for the quick reply! However, I have that much in my code too, but issue I am having is I am not sure how to make the texts appear in the box. To be honest, I never really done client scripts, so I am lost.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-17-2022 08:53 AM
Hi Sam,
Try creating client script as Prasad suggested.
It will be helpful for you learning as well.
Post here if you see any challenge.
create onchange() client script on priority field and select the table on which table you want to run this.
Then use the above logic.
Thanks
Murthy
Murthy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-17-2022 10:05 AM