How to change what a VA chat card displays as header?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-18-2023 09:43 AM
I'm using a "Record" type card from our Outages table to display outages to the VA users before they talk to a live agent.
The options I have are:
Card type: Record
Populate by referencing: Table
Table: Outage
Condition: Script (I'm filtering by having certain content in one of the fields of the associated CI)
Fields: some selected fields from the table record.
And that's all I have other than Node Conditions which are not set.
By default, the header of the card is using a field in the record called "Short Description":
How can I choose a different field to use as the title?
I read somewhere about scripted cards but I cannot find any documentation about that.
Thanks
These are the settings:

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-29-2023 01:06 AM
Hi,
Yes there is scripted card renderer option, you can try this below,
var grIncident = new GlideRecord('incident');
grIncident.addEncodedQuery("caller_id=javascript:gs.getUserID()^active=true^universal_requestISEMPTY");
grIncident.query();
if (grIncident.next()) {
var title = {url : 'www.google.com', label : 'hi there'};
var fields = ['number','opened_at'];
var fieldToRender = new global.VaRecordCardRenderer().createFields(fields, grIncident);
var s = new global.VaRecordCardRenderer().renderCard(title, fieldToRender);
}
return s;
Output