Working Code

Questions

0 Answers9

// Array Utils   var firstArray= ['Green','Brown','Red','Orange','Yellow','Orange']; var secondArray=['Purple','Black','Green','Blue','Orange']; var thirdArray=['White','Orange','Green','pink']; var demoObject={name:'Bean Plant',color:'Green',vegetable:'Beans'}; var arrayUtil=new ArrayUtil();   // Merge two arrays gs.info(arrayUtil.concat(firstArray,secondArray));   // Check array contains the required value...

View Question
0 Votes 40 views Edited question ServiceNow
0 Answers9

[apcode language="php"] findReqElementCount(5); // In function we are passing the parameter as 5, which     says that we have to count the item 5 occurrence in an array.      function findReqElementCount(value){     var...

View Question
0 Votes 35 views Asked question ServiceNow
0 Answers9

[apcode language="php"] var firstArray=[5,5,3,5,8,5,9,5,4,5,9,5];     for(var i=0;i<=firstArray.length;i++){          if(firstArray.indexOf(5)!=-1){             firstArray.splice(firstArray.indexOf(5),1);             }     }     gs.info(firstArray);

View Question
0 Votes 25 views Asked question ServiceNow
0 Answers9

GlideElement - nil() Determines if the field is null, applicable only to the elements of glideRecord object. Returns true if the field is null or an empty string, false To enable the for text search, you will need to enable the text index for the table. To do that,  1. Open Dictionary (sys_dictionary) table  2. Search for...

View Question
0 Votes 97 views Asked question ServiceNow
0 Answers9

"sn_itsm_va.com.snc.itsm.virtualagent.portal_url" property. Unfortunately, this is not dynamic as the VA is not able to get users session information.  Steps to resolve the issue are as follows:  Go to...

View Question
0 Votes 102 views Asked question ServiceNow
0 Answers9

(function runMailScript(current, template, email, email_action, event) {      // Get Requested Item     var reqitem = current.request_item;      // Get Owned Variables for Requested Item and sort by Order     var ownvar...

View Question
0 Votes 152 views Asked question ServiceNow
0 Answers9

Code to generates a virtual agent greeting message based on the time of day ServiceNow(Good Morning, Good Afternoon , Good Evening) (function execute() { var getime = new...

View Question
0 Votes 112 views Edited question ServiceNow
0 Answers9

Script Include :  var WeekDay = Class.create(); WeekDay.prototype = Object.extendsObject(AbstractAjaxProcessor, {     WorkDay: function() {   var selected_date = this.getParameter("sysparm_date");   var d = new GlideDateTime(selected_date);   var dayCount = d.getDayOfWeekLocalTime();  //...

View Question
0 Votes 146 views Asked question ServiceNow
0 Answers9

The addExtraField() method allows you to query dot-walked fields in a single database request, rather than perform multiple queries per dot-walked element in a form or script var gliderecord =...

View Question
0 Votes 339 views Asked question ServiceNow
Load more questions
Scroll to top