can I change the label for the variable formatter name that shows up on a form?

tricial
Giga Contributor

I need to change the name that shows up on the form for the Varaible editor formatter so instead of displaying

Varaibles, I need to label that to be Work Actions or something other than variables.

Thank you

Tricia

1 ACCEPTED SOLUTION

Next step is to check your browser console and see if there are any errors.   There could be another script preventing this one from running.   You can also test in the Javascript executor (press CTRL+ALT+SHIFT+J) while viewing the 'sc_task' form where the variable editor is and paste in everything inside of the 'onLoad' function.


View solution in original post

17 REPLIES 17

Hmm, that should work without issue.   Can you send me a screenshot of your client script form for this script?


Thanks Mark,


I also tried adding the innerText


But to no avail








<https://htmlsig.com/t/000001C0XZNW>


Patricia Lynch / ServiceNow Senior Technical Consultant 
patricia.lynch@cdillc.com<mailto:patricia.lynch@cdillc.com>


CDI LLC 
O +1 (201) 426-9264
M +1 (201) 397-3766


696 US 46 West, Teterboro, NJ 07608 
www.cdillc.com<http://www.cdillc.com/>


<https://htmlsig.com/t/000001C4DJ2F>[cid:image005.png@01D28E89.FD0654C0]<https://htmlsig.com/t/000001C8HE8S>[cid:image006.png@01D28E89.FD0654C0]<https://htmlsig.com/t/000001C6Q638>[cid:image007.png@01D28E89.FD0654C0]<https://htmlsig.com/t/000001C95K6C>


I think I see the issue.   Your UI type is 'Mobile/Service Portal'.   If you change that to 'Desktop' does it work on the standard, back-end forms?   DOM manipulation like this isn't permitted in the Service Portal interface so you're out of luck if you want this script to work in Mobile or Service Portal.


Hey Mark,



Nope — If I change it to Desktop still not changing the name.




Next step is to check your browser console and see if there are any errors.   There could be another script preventing this one from running.   You can also test in the Javascript executor (press CTRL+ALT+SHIFT+J) while viewing the 'sc_task' form where the variable editor is and paste in everything inside of the 'onLoad' function.