
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā06-10-2019 12:11 AM
Hi,
On my record I have variable called name referenced to sys_user table.
After form submission form the portal why the case description show the logged in user value as well next to the variable as orginal value
I'm aware this is populating from "hr_CaseUtils" script include by the method "_getDescriptionFromAnswers ".
How to avoid that.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā06-10-2019 01:37 AM
Tried, though because the blanc value it is ignored:
Tried with a ".", works so the getMessage theory is oke.
Only works on SP:
Of course you could also go for editing the Script Include like I described. Though I personally would avoid changing the Script Include if possible (then it's not out-of-the-box anymore and updates from patches/upgrades will ignored).
If my answer helped you in any way, please then mark it as helpful.
Kind regards,
Mark
---
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā06-10-2019 12:22 AM
Hi there,
What is it exactly you are after? Just removing the "original value" part? You could of course edit the Script Include (it's not protected, only scoped). There's a line with literally the text "original value". Changing this will make the Script Include not out-of-the-box anymore.
var txt = gs.getMessage(' (original value: {0})', originalDisplayValue);
Other option could be to make an extend of the script include and override the _getDescriptionFromAnswers method, though that would be some work.
Another option, not the most pretty one but will work: create a sys_ui_message record with key " (original value: {0}" (including the starting space) and leave the value blanc.
If my answer helped you in any way, please then mark it as helpful.
Kind regards,
Mark
---
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā06-10-2019 12:26 AM
Hi Mark,
Why orginal value is being displayed for the custom variables and what could be the need of it?
I do not want to have it on any of my custom forms. Please suggest the best method.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā06-10-2019 12:31 AM
Hi there,
If you don't want it at all, you could try:
- Creating a sys_ui_message like I mentioned. This is a workaround, though you are not changing out-of-the-box code. So add a sys_ui_message with key " (original value: {0}" and value blanc.
or
- Remove from the script include lines 127 till 130:
if ((originalValue || originalDisplayValue) && !this._requiresUserOrProfileCreation.hasOwnProperty(hrServiceValue)) {
var txt = gs.getMessage(' (original value: {0})', originalDisplayValue);
filledValues += txt;
}
If my answer helped you in any way, please then mark it as helpful.
Kind regards,
Mark
---
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā06-10-2019 12:55 AM