We're reclaiming inactive PDIs to keep them available for active builders. Learn what's changing, who's affected, and how to protect your work. Read More

Custom table header should also show the Status of the ticket

rBh
Tera Contributor

Hi Team,

 

We have a requirement to display the ticket status alongside the ticket number or elsewhere in the form header.

 

We have already suggested using Process Flow Formatters, but the client specifically wants the status to be displayed in the form header itself.

Could you please let us know if this requirement can be achieved using an out-of-the-box configuration, or if it would require customization? If customization is required, could you please advise on the recommended approach?

 

rBh_0-1784198358285.png

Apart from process flow formatter please suggest if its possible to achieve it?

 

Thanks,

Bhavana

1 REPLY 1

Ankur Bawiskar
Tera Patron

@rBh 

no out of the box option available for this

you can use DOM manipulation to add some text there i.e. Status value but DOM is not recommended

if you still want you can use onLoad client script with Isolate Script = False to allow DOM

this worked for me, you can try to play with the HTML DOM and manipulate the alignment etc

function onLoad() {
    setTimeout(function() {
        var button = document.getElementById('header_add_attachment');
        if (button) {
            var choiceValue = g_form.getValue('state');
            var choiceLabel = g_form.getOption('state', choiceValue).text;
            button.insertAdjacentHTML(
                'beforebegin',
                '<p>' + choiceLabel + '</p>'
            );
        }
    }, 2000); // Wait 2 seconds

}

AnkurBawiskar_0-1784200098213.png

 

Output

AnkurBawiskar_1-1784200198791.png

 

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader