short cut for display backend values on form in servicenow ?

YAnjali_07
Tera Contributor
 
4 REPLIES 4

Abbas_5
Tera Sage
Tera Sage

Hello @YAnjali_07,

Please refer to the link below:
https://www.servicenow.com/community/itsm-forum/how-to-show-the-back-end-value-of-the-field-on-the-f...

 

Mark my correct and helpful, if it is helpful and please hit the thumbs-up button to mark it as the correct solution.
Thanks & Regards,
Abbas Shaik

Danish Bhairag2
Tera Sage
Tera Sage

Hi @YAnjali_07 ,

 

There is a utility called as SN Utils which u can install it on ur browser specifically chrome n then when ever u double click or press /tn it will display all the backend field names.

 

Link to the Utils

https://chrome.google.com/webstore/detail/sn-utils-tools-for-servic/jgaodbdddndbaijmcljdbglhpdhnjobg

 

Thanks,

Danish

chetanb
Tera Guru

Hello @YAnjali_07 

 

If i understand correctly, you want to know the backend values of form fields directly on the form itself instead of going everytime into dictionary.

If this is the case, you can you use google browser extension- SN Utils-

https://chrome.google.com/webstore/detail/sn-utils-tools-for-servic/jgaodbdddndbaijmcljdbglhpdhnjobg...

 

Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

 

Regards,

CB

Siddhesh2
Giga Guru

Hello @YAnjali_07 

You can add below chrome extension which provides more useful functions for developers.

SN Utils 

If you are onPrem instance then you can user this SN Utils onPrem 

 

You can also use below script if you are not using chrome browser.

function onLoad() {
    // Array of field names for which you want to display backend values
    var fieldsToDisplay = ['field1', 'field2', 'field3']; // Add your field names here

    // Loop through each field and display the backend value below the label
    fieldsToDisplay.forEach(function(fieldName) {
        var fieldLabelElement = gel('label.' + fieldName);
        var fieldValueElement = gel(fieldName);

        if (fieldLabelElement && fieldValueElement) {
            var backendValue = g_form.getValue(fieldName);
            var backendValueElement = document.createElement('div');
            backendValueElement.innerHTML = '<span style="font-weight: bold;">Backend Value:</span> ' + backendValue;

            // Insert the backend value element below the field label
            fieldLabelElement.parentNode.insertBefore(backendValueElement, fieldLabelElement.nextSibling);
        }
    });
}

 

If my response is helpful, please indicate it by selecting "Accept as Solution" and " Helpful."