Scripting

/Scripting

Advanced Reference Qualifier Using a Script Include

By | June 21st, 2011|Categories: Script includes|Tags: , |

Reference qualifiers are a powerful tool that every ServiceNow administrator and consultant should have in their tool belt. They allow you to dynamically filter the available options from a reference field. The ServiceNow wiki has some good documentation on this topic so I won’t re-hash that here. What I do want to address is the topic [...]

Hide Empty Variables on a Standard Form

By | June 16th, 2011|Categories: Business rules, Client scripts|Tags: , , |

Service catalog variables can be a challenge to deal with on standard forms when they are displayed in a variable editor. I’ve written before about different ways that you can solve one of these challenges…making the variables read only, so that they can’t be modified after the initial submission through the service catalog interface. Another common [...]

Hiding Related Lists and Embedded Lists

By | June 15th, 2011|Categories: Client scripts|Tags: , , |

I just saw a question on the ServiceNow forums asking how you could show and hide an embedded related list on a form. I just created some client scripts to accomplish this task so I figured I would share them here. I’ll also review the methods and limitations for showing and hiding standard related lists using [...]

Solving the Client Script ‘Before and After’ Problem

By | June 13th, 2011|Categories: Client scripts, System UI, UI macros|Tags: , , , |

Every now and then I come across a question dealing with the order of execution for client-side code (Client Scripts and UI Policies). In my experience, the need to order client-side code is pretty rare and really only applies in a few ‘onLoad’ scenarios and even fewer ‘onChange’ scenarios. Usually, the way that a browser parses [...]