Card response:Is it possible to only display the content of the field without the name of the field?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2023 06:51 AM
I am trying to display the content of a field from a table using card response bot but I don't want it to display all the info(names of fields/table/etc). I just want the bot to display the content of the field I'm selecting.
instead of this:
I would like to have this:
Is that possible using the card bot response?
reason behind my madness: MS teams integration doesn't parse html correctly when using script bot response but the card bot response does work.
thanks in advance

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-29-2023 02:51 AM
Yes the card component is just an HTML, so you can script it can replace the label. try this below in a script output,
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);
}
s = s.replace(/Number|Opened/gi, function(){
return '';
});
return s;
Output with label and without label