Skip to page contentSkip to chat
ServiceNow support
    • Community
      Ask questions, give advice, and connect with fellow ServiceNow professionals.
      Developer
      Build, test, and deploy applications
      Documentation
      Find detailed information about ServiceNow products, apps, features, and releases.
      Impact
      Accelerate ROI and amplify your expertise.
      Learning
      Build skills with instructor-led and online training.
      Partner
      Grow your business with promotions, news, and marketing tools
      ServiceNow
      Learn about ServiceNow products & solutions.
      Store
      Download certified apps and integrations that complement ServiceNow.
      Support
      Manage your instances, access self-help, and get technical support.
Description field on the "discovery_printer_supplies" table has hex values instead of a string - Support and Troubleshooting
  • >
  • Knowledge Base
  • >
  • Support and Troubleshooting (Knowledge Base)
  • >
  • Description field on the "discovery_printer_supplies" table has hex values instead of a string
KB0713205

Description field on the "discovery_printer_supplies" table has hex values instead of a string


651 Views Last updated : Apr 7, 2024 public Copy Permalink
KB Summary by Now Assist

Issue

Symptoms


When you run disocvery on printers, the description field on "discovery_printer_supplies" records have hex values instead of a string.

Release


Applicable to all releases

Cause


The printer supplies information is queried at the OID "1.3.6.1.2.1.43.11" from the SNMP - Printing probe. 

If we are getting back a hex value from this probe, we are directly parsing this value from the payload and updating the description field on discovery_printer_supplies records. So you might see hex values in place of a string.

Resolution


Create an update/insert business rule on discovery_printer_supplies table. Make the business rule advanced and paste the following code:

--------------------------------------------------------------------------------

(function executeRule(current, previous /*null when async*/) { 

var input = current.description 
var nospace = input.replace(/\s/g, ''); //remove spaces from the hex value we have 

regexp = /^[0-9a-fA-F]+$/; 
var res = regexp.test(nospace); //validate if the value we have is hex 

if (res == true){ //convert to string only if the value we have is hex 
var string = ''; 
for (var i = 0; i < nospace.length; i += 2) { 
string += String.fromCharCode(parseInt(nospace.substr(i, 2), 16)); 
} 
current.description = string; 
} 

})(current, previous); 

--------------------------------------------------------------------------------


Save the business rule and run discovery on the affected printers.


The world works with ServiceNow.

Sign in for more! There's more content available only to authenticated users Sign in for more!
Did this KB article help you?
Did this KB article help you?

How would you rate your Now Support digital experience?

*

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

What can we improve? Please select all that apply.

What are we doing well? Please select all that apply.

Tell us more

*

Do you expect a response from this feedback?

  • Terms and conditions
  • Privacy statement
  • GDPR
  • Cookie policy
  • © 2025 ServiceNow. All rights reserved.