Blog

Tricks for Everyday Development

Collection of tricks using other applications related to ServiceNow development. Microsoft Office, Image editing, and Chrome.

Word

Convert to PDF

When creating a design document or statement of work, I always convert to PDF to send to the client. It is a more professional presentation and expected in client communication.

  1. Open document in word

  2. File > Save As

  3. Select the file location

  4. Select File Type of PDF (*.pdf)

  5. Click Save

Convert PDF to Word

Occasionally you’ll want to rip some information out of PDF for your usage. Here’s a good trick that might save you an Adobe Acrobat DC Standard license.

  1. Open Word (sometimes needs to be Word 2016 or later)

  2. Click Open

  3. Select the PDF

  4. Click Ok to Prompt

  5. Click File > Save As to save as .docx file

Convert Links

If you want to reuse a document and replace all the links. This is helpful when replacing the ServiceNow instance name in a document.

Replace Field Codes (Hidden Hyperlink)

  1. Open a document in word

  2. Click View > Draft

  3. Press Alt+F9 to show field codes

  4. Press Ctrl+H to show the Find and Replace Dialog Box

    • In the Find box, enter the portion of the link you want to change.

    • In the Replace box, enter the new portion of the link.

  5. Click Replace All. Word replaces all the text within the exposed links.

  6. Close the Find and Replace dialog box.

Replace Links

  1. Press Alt+F9 so that field results (links).

  2. Press Ctrl+H to show the Find and Replace Dialog Box

    • In the Find box, enter the portion of the link you want to change.

    • In the Replace box, enter the new portion of the link.

  3. Click Replace All. Word replaces all the text within the links.

Excel

Text to columns

Sometimes you need to format a delimited text file so it can be used as an excel file. This can happen if you get an export from a script or other means.

  1. Open the document in Excel

  2. Select the first column

  3. Click Data > Text to Columns

  4. Select Delimited, click next

  5. Select your delimiter, like |

  6. Click Finish

Unique

  1. Open the document in Excel

  2. To filter for unique values, click Data > Sort & Filter > Advanced.

  3. Select the “Unique records only” checkbox

Remove Duplicates

  1. Open the document in Excel

  2. To filter for unique values, click Data > Data Tools > Remove Duplicates.

Match function

Often I use a MATCH function to compare data. You can also use other methods like VLOOKUP, but this works for me.

The MATCH function searches for a specified item in a range of cells, and then returns the relative position of that item in the range. For example, if the range A1:A3 contains the values 5, 25, and 38, then the formula =MATCH(25,A1:A3,0) returns the number 2, because 25 is the second item in the range.

Filter

  1. Open the document in Excel

  2. To filter for unique values, click Data > Sort & Filter > Filter.

  3. Drop-down arrows will appear in the header of each column.

  4. Click the drop-down arrow for the column you want to filter.

Image Editor

Always been too cheap for photoshop. I use a program called GNU Image Manipulation Program (GIMP)

wilber-big.png

Here are some of the common things you might do on a ServiceNow project.

Of course there are lots of things to learn when using an image editor. I am a freelance photographer, and while photography hasn’t earned me many dollars, learning image editing definitely did.

Browser

These items are for Google Chrome, however these tricks can also be applied to other browsers as well.

Inspect Element

If you are working with the Service Portal, Inspect Element is a go-to utility. Here are just some of the things you may use inspect element for:

  • Inspect any element in the DOM tree in the Elements panel. Useful for determining how to alter a widget.

  • See any client-side errors in the console. Useful for client scripts gone wrong.

  • View and change the CSS rules applied to any selected element in the Styles pane. Use to add CSS to your site.


Close Tabs to the Right

When editing a lot of variables or client scripts, I’ll CTRL-Click the links to open up into new tabs. Eventually I’ll get a ton of tabs open. “Tab Hell” as it is referred to.

If you right-click on the browser’s tab bar, you can “Close tabs to the right”. That is really helpful in closing down “Tab Hell”.

Incognito Mode

When diagnosing an issue, it is useful to have another session open so that you can see what the user sees when you make code changes.

I use Incognito mode in Chrome to have that other session open.

Chrome Extensions

  • Color Pick Eyedropper - Use this to find a HTML color code of a image or website for use in your Service Portal or ServiceNow theme.

  • Font Finder - Find out what fonts a website uses