Tips and Tricks: Reluctant vs. Greedy...
A common use for regular expressions is to extract some text from a larger piece of text, based on some delimiters that define the range of text to pull out. For instance, I might want to extract the ...
A common use for regular expressions is to extract some text from a larger piece of text, based on some delimiters that define the range of text to pull out. For instance, I might want to extract the ...
Yesterday I showed you how to figure out whether an object had a certain property. But suppose you didn't know ahead of time which property you wanted? Then what you'd want to do is to enumerate all t...
Parallel Homepage Rendering is a new feature introduced in the Spring 2010 Stable 2 release. The following information was created by Pat Casey, Service-now.com Principal Architect:OverviewHome pages ...
Hi everyone,Documentation is now available for the Tiny URL Support Plugin, newly released with Spring 2010 Stable 2:http://wiki.service-now.com/index.php?title=Tiny_URL_Support_PluginThe Tiny URL Sup...
Yesterday I showed you how to represent things in a JavaScript object. But what if you have the opposite problem — you have an object, but you want to know what it represents? More precisely, you want...
A few days ago I was talking with someone I'll call Joe about one of our Discovery scripts. Joe was trying to figure out something we were doing in the script, and I finally figured out what was givin...
Discovery has just acquired a snazzy new feature that will be available starting with the "Stable 3" build coming up in early September, and it will be in the Fall 2010 release. The screenshot at righ...
In an earlier post, I touched a bit on the arguments property that's available in any function. There I showed how you can use it to create functions that take a variable number of arguments. Today I'...
Have you ever written a handy-dandy little script function, and then wished you could have it accept different kinds of arguments? For instance, perhaps you wrote a function that took a list of people...
There are occasions when it is quite useful to have a function argument that isn't an actual value (in the usual sense of a number, string, etc.), but rather a way to get a value. There are also occas...
Hi everybody,Today's release is now officially documented! A nice end to another release cycle. If you want to find out what's coming in Spring 2010 Stable 2 and how it works, here's the release notes...
If you've done any scripting of Service-now.com, you've almost certainly run into the notion of a sys_id: the unique 32-character long identifier that is the primary key for every record in every tabl...
[asset|aid=344|format=Small|formatter=asset_lightbox|title=destructive_god.jpg|width=150|height=150|align=right]Wanton destruction is generally a bad thing (though fun to watch on a movie, if the spec...
Hi everyone,Today we've released a new topic about managing data. It involves some very intro-level documentation for administrators, as well as more detailed and better organized information about da...
[asset|aid=340|format=Small|formatter=asset_lightbox|title=nerdette.jpg|width=150|height=113|align=right]Suppose your boss wanted to automatically scan every week to look for any "dog" computers you m...
Have you ever needed to write a script that did some work on a lot of records in a table? In such situations it can be very useful to work on one "chunk" of records at a time. There are many reasons w...
Have you ever wished you could display a related list, but you couldn't figure out how to do it because the things you wanted to list were not related in the usual way (as either a related list or as ...
And now for something completely different: a contest! If you click on "Read more" below, you'll see some code that finds prime numbers using the Sieve of Eratosthenes algorithm. Can you find the bug ...
My post on recursion yesterday left some of you wanting a more, er, practical example. What's a real-world example of where one might choose recursion?Ask and ye shall receive:var filesystem = [{name:...
Hi everyone,We've just completed a project to rewrite the Update Sets Documentation. You can find it here:http://wiki.service-now.com/index.php?title=System_Update_Sets_(remote_update_set_support)_Plu...