Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

In other news
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Blog Articles

Tips and Tricks: Recursively Speaking...

What's this "recursion" I keep hearing people talk about? That's a question I got the other day. Recursion is a concept that has (unfairly, I think) gotten a reputation for being difficult to understa...

Tips and Tricks: A Little Abstraction...

Have you found yourself writing almost the same code, over and over again? I recently spoke with someone who had very similar code in several different places, always to get a related list of a CI. Ea...

Updated Documentation: Web Services

Hi everyone,Our existing Web Services documentation is now available as a single PDF, for reference:http://wiki.service-now.com/index.php?title=Book:Web_ServicesGuy YedwabService-now.com Documentation

Tips and Tricks: More Equal...

What do you suppose will be logged when you run the code below?test(5, '05', 'numeric 5', 'string "05"');test('5', '05', 'string "5"', 'string "05"');test(5, 5, 'numeric 5', 'numeric 5');function test...

Tips and Tricks: Argumentative Functions...

If you've done any programming at all in JavaScript, then you're familiar with functions (I hope!). Normally a function looks something like this nice little message formatting function:var x = say('$...

Tips and Tricks: Those Cloying Closures...

You may sometimes find yourself writing code over and over again with only minor variations. The pattern of these blocks of code (often a function) is the same, but some small particulars may vary. Th...

Belly of the Beast: It's Complementary!

There are times when it's very handy to understand exactly how numbers are represented inside a computer. I'm sure you know that numbers (at least integers) are represented in binary (base 2) form. Bu...

Tips and Tricks: The Wrong Sort...

Have you ever had trouble sorting stuff into the "right" order? JavaScript (and most other languages), by default, sorts numbers into numeric order and everything else into lexicographical (i.e., alph...

Tips and Tricks: Deeply Weird...

Consider this little piece of code:var x = 0.1;var y = 0.2;var z = 0.3;if(z == x + y) gs.log('Of course 0.3 equals 0.3!');else gs.log('What a moronic computer!');What do you think it will print out?Ap...

Tips and Tricks: Analyzing Tabular Text...

It's a fairly common challenge when writing Discovery probes or Runbook activities: you've executed some command on a computer, it returns some text in a tabular format, and now you need to analyze it...

Round 'Em Up!

Sometimes you'd rather show "265" on the screen instead of "265.39128376465" — perhaps because it's just easier to understand, or perhaps because the calculation that yielded that very precise looking...

Tips and Tricks: Sets in JavaScript...

Not long ago I came across a piece of code whose purpose was to eliminate the duplicates from a comma-separated list of email addresses. The approach taken was to put the email addresses in an array, ...

Tips and Tricks: Double or Nothing...

Not long ago I helped someone troubleshoot their script, which had the same problem as the sample script below. I'm more than old enough to have a glass of wine, but the script below says I'm to get a...

Phoenix is Hot!

Earlier this month I visited a customer in Phoenix, Arizona. I rented a little red car with a black interior, and made the mistake of leaving the windows rolled up tightly. During the day the temperat...

Help Wanted...

Service-now.com is growing, including our team of Discovery, Runbook Automation, and CMDB developers. If you (or someone you know) are an insanely great Java and JavaScript developer, know your way ar...