Placeholder Text on Service Operations Workspace

Abbottronix
Tera Guru

I'm using UI policies to reference messages and insert them as placeholder text on my change requests.

 

Abbottronix_0-1750646959380.png

 

This works fine in the default view, however if I open a change request on the Service Operations Workspace, it looks like this:

 

Abbottronix_1-1750647126894.png

 

I've tried doing a client script instead, but it doesn't work either:

 

Abbottronix_2-1750647172567.png

 

 

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

@Abbottronix 

placeholder work differently in workspace

this worked for me in Service Operations Workspace

In your client script determine if it's native or workspace and accordingly handle

	g_form.setFieldPlaceholder('close_notes', 'Enter a close notes');
if (top.location.href.indexOf('/now/sow/') > -1) {
        // code for workspace
        g_form.setFieldPlaceholder('close_notes', 'Enter a close notes');

    } else {
        // your current code for native
    }

AnkurBawiskar_0-1750656588371.png

 

reference link, response from wmcgrath

How to Set Placeholder for Change Request using Client Scripts 

If my response helped please mark it correct and close the thread so that it benefits future readers.

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

View solution in original post

2 REPLIES 2

Ankur Bawiskar
Tera Patron
Tera Patron

@Abbottronix 

placeholder work differently in workspace

this worked for me in Service Operations Workspace

In your client script determine if it's native or workspace and accordingly handle

	g_form.setFieldPlaceholder('close_notes', 'Enter a close notes');
if (top.location.href.indexOf('/now/sow/') > -1) {
        // code for workspace
        g_form.setFieldPlaceholder('close_notes', 'Enter a close notes');

    } else {
        // your current code for native
    }

AnkurBawiskar_0-1750656588371.png

 

reference link, response from wmcgrath

How to Set Placeholder for Change Request using Client Scripts 

If my response helped please mark it correct and close the thread so that it benefits future readers.

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

Thanks, I got it working using a similar change to the code

Abbottronix_0-1750809999087.png