- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-06-2020 09:56 AM
Good afternoon community,
I am attempting to add a displayed field to the TICKET FIELDS widget on the portal. I have the field added (DUE_DATE), by editing the server script side to include it, but when it is displayed on the portal, it is not displaying the due date, but for some reason showing JUST NOW (actual data in field is "1/10/2020 08:11:58 AM")-
I am little stumped since the date created is correct... do I need to have it display the display value instead somehow, or is there something else I can do?
Thanks everyone!
Jeff
Solved! Go to Solution.
- Labels:
-
User Interface (UI)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-12-2020 08:39 AM
Hey all, I think I can assist with this.
So you have this section (around line 16 or so):
var fields = $sp.getFields(gr, 'number,state,priority,sys_created_on');
if (gr.getValue("sys_mod_count") > 0)
fields.push($sp.getField(gr, 'sys_updated_on'));
Now right below this, add this in (and just shift everything else that was already here down):
for(var i = 0; i < fields.length; i++) {
if(fields[i].label == "Due date")
fields[i].type = "string";
}
And that should be all you need.
So final could look somewhat like this:
var fields = $sp.getFields(gr, 'number,u_item_name,priority,category,state,subcategory,stage,u_reject_code,due_date,u_reject_reason,sys_created_on');
if (gr.getValue("sys_mod_count") > 0)
fields.push($sp.getField(gr, 'sys_updated_on'));
for(var i = 0; i < fields.length; i++) {
if(fields[i].label == "Due date")
fields[i].type = "string";
}
Please mark reply as Helpful/Correct, if applicable. Thanks!
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-12-2020 10:44 AM
Awesome. I cannot tell you how many variations of getDisplayValue I tried unsuccessfully!
This is perfect. Thanks!