We've updated the ServiceNow Community Code of Conduct, adding guidelines around AI usage, professionalism, and content violations. Read more

Developer forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Forum Posts

Resolved! Get Client Local IP Address

Hello,  Does anyone know how to get the client Local IP address in servicenow.  I see there is a way to get the Public IP address using the below method, but need a way to get the local IP address.gs.getSession().getClientIP();  Please let me know if...

Sureshdta by Kilo Explorer
  • 11735 Views
  • 3 replies
  • 0 helpfuls

Resolved! GR Query for Operational Status

Hi All, Good Day! I was asked to the below requirement and as my task doesn't mainly include scripting I'm trying to process what is being asked here: Create a new function called ChangeManagementUtil called "isContainsRetiredCIs" which accepts the c...

Resolved! Get first element of array if is a string number

Hi all, I have this array of objects, and i have to take the first object that have property 'userId' as a number For example i want to take object {name: 'Mario',userId: '040287960321'} to do this I would like to do a while-loop and use regex, so th...

Resolved! Help with User Criteria Advanced Script

Hello - I am working on a User Criteria requirement for a Catalog Item that I am adding.  We have a custom field on the sys_user table called:  u_job_code.   I only want users with a specific job code to see this catalog item.  This u_job_code field ...

jlaue by Mega Sage
  • 13812 Views
  • 9 replies
  • 14 helpfuls

addOption() in client script?

Hi all, I have a Client Script where I am adding Choices through addOption() but when I save the record the backend value is populating instead on Label.   g_form.addOption('u_available_phone', '10', ans1[0]);

Sid_Takali by Kilo Patron
  • 2722 Views
  • 6 replies
  • 0 helpfuls

Resolved! comments in flow designer

in flow designer action  , is there a way to combine two input  variables in one data pill to be the value  . As an example, input variable location = city data pill + state data pill 

Resolved! GlideEncrypter in scoped app

GlideEncrypter in scoped app? Create a new script include in the global context that takes your string value as a parameter and then use GlideEncrypter to do the work for you inside the script include function. You then return the the encrypted value...

Script Include returning null?

Hi all,  The following Script returning null value. I need consumer sys_id. Thanks in advance  Script Include -  var customerPhones = Class.create();customerPhones.prototype = Object.extendsObject(global.AbstractAjaxProcessor, {     ConsumerS: functi...

Sid_Takali by Kilo Patron
  • 3218 Views
  • 10 replies
  • 5 helpfuls