- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-22-2022 04:44 AM
When the user is changing the priority of the incident the priority should be appended at the start of the description with the previous description value? Ex: The previous description is: "The Priority Value is: 5 " then the user changed the urgency to anything and then save the form. after saving it the description should be "The Priority Value is 3";
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-26-2022 01:05 AM
Can you try adding below script in your onSubmit client script
var desc = g_form.getValue('description');
var start, end, new_desc;
if (desc.includes("The priority value changed to ")) {
start = desc.indexOf("The priority value changed to ");
end = start + 30;
new_desc = setCharAt(desc, end, g_form.getValue('priority'));
g_form.setValue('description', new_desc);
} else {
new_desc = desc + " The priority value changed to " + g_form.getValue('priority');
g_form.setValue('description', new_desc);
}
function setCharAt(str, index, chr) {
if (index > str.length - 1) return str;
return str.substring(0, index) + chr + str.substring(index + 1);
}
Start from a new incident and test it.
Mark as correct and helpful if it solved your query.
Regards,
Sumanth
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-22-2022 05:31 AM
Yes , The description could be anything but the value should be populated dynamically.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-22-2022 05:34 AM
If the current description is
"Hi hello The Priority value is 5 hello"
and we change priority to 3 then should it print
"Hi hello The Priority value is 5 hello The Priority value is 3" ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-22-2022 05:49 AM
Yes, correct, is there any solution Sumanth!
I want like this :
Previous Impact was : 1 - High
urgency was : 1 - High
then Priority was : 1-critical
hence desc was: The Priority Value is 1 - Critical
but After some time I changed
Impact to: 2 - Medium
urgency to : 2 - Medium
Then Priority Changed to - 3 - Moderate
Here My desc should be : The Priority Value is 3 - Moderate

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-22-2022 06:11 AM
You need to have an Insert/Update BR:
the script will be as below:
current.priority = "The priority value is : " + current.getValue('priority');
Feel free to mark correct, If I answered your query.
Will be helpful for future visitors looking for similar questions 🙂
Aman Kumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-22-2022 06:32 AM
Hii Aman ,
Req is like "The Original description should be present with Value ". User can change desc value.
Desc be like : "this part could be anything " + "priority value"
ex 1: The priority value is 1 .
ex 2 : The priority Value Changes to 3 .