Why is the value not reflected in my list view for my referenced field?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-26-2022 12:30 AM
Hello,
I was testing if I could put a custom column in sys_approval table to put for information for my knowledge article that is approve.
So I created a new dictionary record on sys_approval table as reference type referencing knowledge.
But did I miss something? since when I configured my list, the value for short description is not reflected on the list view even though it is existing on the KB article?
Thanks in advance
- Labels:
-
UI Framework Next Experience
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-26-2022 12:39 AM
Hi,
so even when value is selected it's not showing the display value on list?
how it behaves on form?
regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-26-2022 12:52 AM
Hello,
Yes the field for short description and workflow is selected to show on my list, but those columns are not showing the value.
Value not displayed on short description and workflow column.
But it could be seen that in the approval record referencing knowledge article there is value for short description and workflow column.
This is how i configured my referenced field on sys_approval table.
Thanks in advance

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-26-2022 01:32 AM
Hello,
That will not work like this, See what we have done
1) Create custom field on approval record 'KB Short description'.
2) In Dictionary of custom field we have added script like below in 'Calculated value' section.
Script :
(function calculatedFieldValue(current) {
// Add your code here
if (current.source_table == "kb_knowledge"){
var gr = new GlideRecord(current.source_table);
var sd = "";
gr.addQuery('sys_id',current.document_id);
gr.query();
while(gr.next()){
sd = gr.short_description;
}
return sd; // return the calculated value
}
return '';
})(current);
This way it will work properly, Apply same logic in your case.
Please hit like and mark my response as correct if that helps
Regards
Regards,
Musab
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-26-2022 06:14 PM
Hello,
thanks for the workaround, but I think it still doens't solve the problem, since the field would be created individually. I think it would be more ideal if were able to leverage using reference. As I looked on the other field on sys_approval table, it was also using some referenced table as field. I just can't find what am I missing to make this work.
Thanks.