- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-02-2025 11:13 PM
Hi all,
how can we add the resolution code in to the comments, so that the creater can the the resolution code inforation in the comments?
Thank you
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-03-2025 12:41 AM
Hi @BuriB ,
can you try as below
(function executeRule(current, previous /*null when async*/) {
current.comments = "Resolution code is: " + current.getDisplayValue('resolution_code') + "---->"+ "Resolution Notes is: "+current.getDisplayValue('close_notes');
})(current, previous);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-03-2025 12:46 AM
Hello @BuriB
Since the resolution code is a choice field, therefore number you see is the backend value. To get the display value use getDisplayValue() method.
Here is the updated script:
(function executeRule(current, previous /*null when async*/) {
var resolutionCodeLabel = current.resolution_code.getDisplayValue(); // Get the label of resolution_code
current.comments = "Resolution code is: " + resolutionCodeLabel + " ----> " + "Resolution Notes is: " + current.close_notes;
})(current, previous);
Hope this helps!
"If you found my answer helpful, please like and mark it as an "accepted solution". It helps future readers to locate the solution easily and supports the community!"
Thank You
Juhi Poddar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-03-2025 12:37 AM
it looks almost good. I triesd the following:
Resolution code is: 31---->Resolution Notes is: Test 7
How i can change to label?
Thank you

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-03-2025 12:40 AM
Please try current.field_name.getValue()
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-03-2025 12:43 AM
Sorry I am not expert. Where exactly to but current.field_name.getValue()? Could you please put it in the script? Please 🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-03-2025 12:45 AM
Hi @BuriB ,
can you try this
(function executeRule(current, previous /*null when async*/) {
current.comments = "Resolution code is: " + current.getDisplayValue('resolution_code') + "---->"+ "Resolution Notes is: "+current.getDisplayValue('close_notes');
})(current, previous);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-03-2025 12:46 AM
Hello @BuriB
Since the resolution code is a choice field, therefore number you see is the backend value. To get the display value use getDisplayValue() method.
Here is the updated script:
(function executeRule(current, previous /*null when async*/) {
var resolutionCodeLabel = current.resolution_code.getDisplayValue(); // Get the label of resolution_code
current.comments = "Resolution code is: " + resolutionCodeLabel + " ----> " + "Resolution Notes is: " + current.close_notes;
})(current, previous);
Hope this helps!
"If you found my answer helpful, please like and mark it as an "accepted solution". It helps future readers to locate the solution easily and supports the community!"
Thank You
Juhi Poddar