Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Mastering ServiceNow

You're reading from   Mastering ServiceNow Unleash the full potential of ServiceNow from foundations to advanced functions, with this hands-on expert guide fully revised for the Helsinki version

Arrow left icon
Product type Paperback
Published in Oct 2016
Publisher Packt
ISBN-13 9781786465955
Length 656 pages
Edition 2nd Edition
Arrow right icon
Author (1):
Arrow left icon
Martin Wood Martin Wood
Author Profile Icon Martin Wood
Martin Wood
Arrow right icon
View More author details
Toc

Table of Contents (12) Chapters Close

Preface 1. ServiceNow Foundations FREE CHAPTER 2. Developing Custom Applications 3. Server-Side Control 4. Client-Side Interaction 5. Getting Things Done with Tasks 6. Events, Notifications, and Reporting 7. Exchanging Data – Import Sets, Web Services, and other Integrations 8. Securing Applications and Data 9. Diagnosing ServiceNow – Knowing What Is Going On 10. Packaging with Applications, Update Sets, and Upgrades 11. Making ServiceNow Beautiful with Service Portal and Custom Interfaces

Storing data

There are various types of fields provided by the ServiceNow platform. We will explore some of the simpler ones before moving on to the fundamental backbone of the data structure with reference fields:

  • String: These fields are simple text fields. The UI displays a string field as an editable text box. If the Max length attribute in the dictionary is more than 255, then a multiline field is shown. Most fields in ServiceNow are enhanced versions of the string field.
  • Choice: These fields are string fields, but rendered as HTML select fields. The value that is stored in the database is plain text. Another table, the Choices [sys_choice] table, stores the options and labels. This lets the platform convert wip in the database to present Work in Progress to the user. Any values that don't have a label are highlighted in blue in the dropdown.
  • Integer choice: These fields use numbers instead of text to achieve the same result as normal choice fields. They are useful for representing states, since they allow you to use greater-than or less-than conditions, but they have proven difficult to work with since the numbers don't mean much!

    Tip

    Use caution when dealing with the out-of-the-box integer choice fields, such as State on the Task table. If you reuse them (which is a good idea), you should always align your states to the existing ones. For example, 3 should represent Closed. If you do not align them, then users will be confused when reporting. This is discussed in detail in Chapter 4, Client-Side Interaction .

  • Date: There are several date fields in ServiceNow. The time is stored as UTC in the database, and the appropriate display value is calculated by the user's profile.
  • Currency: These are string fields that combine the currency and amount. USD;1000 represents $1,000. The platform uses this information to provide conversions between different currencies. For example, if I prefer to see amounts in GBP, the platform will, if it has the latest currency rates, display £675.
  • True/false: These fields are simple boolean values in the database. They are rendered as tick boxes.
  • URL: These fields provide space to enter a link, which can toggled to be clickable.
  • Email: Similar to URL, the email field lets you type an e-mail address and provides a button to launch your e-mail client through a mailto: link.
  • HTML and Wikitext: Other fields, such as these, provide different interfaces to manipulate strings. It is tempting to use HTML fields in lots of places, but they do come with overhead, and browsers have different capabilities. Test carefully if you want to use capabilities such as these.

Storing files as attachments

In addition to text, ServiceNow can also store binary data. This means that anything (images, music, or even a multitude of PowerPoint documents) can be saved in ServiceNow. Just like everything else, binary data is stored in the database. However, rather than using a BLOB field, binary data is split into 4-KB chunks and saved into the Attachment Documents (sys_attachment_doc) table. Each chunk of a file refers back to the Attachments (sys_attachment) table, where the filename, content type and size, and other metadata are stored.

A file is always related to another record (this is why they are referred to as attachments). Information on this other record is stored with the other metadata in the Attachments table. For example, if a record had a PDF of the booking form attached to it, the Attachment record would contain the filename of the document as well as the sys_id of the Reservation record.

Tip

We'll see in later chapters that there are often better ways than manually adding attachments containing booking information. Why not have the e-mail come directly into ServiceNow? (We'll see how in Chapter 5, Getting Things Done with Tasks.) Or, even better, why not have the guests perform the booking directly with ServiceNow? (Chapter 10, Packaging with Applications, Update Sets, and Upgrades, will show us how to do this.)

Setting properties

One of the simplest ways to control the platform is to set properties. There are lots of things you can change by just clicking on a box or changing a value. And just like everything else in ServiceNow, the configuration properties that you set are stored in a table-the System Properties [sys_properties] table to be precise.

To see how many options you can choose, type Properties in the filter-text box of the application navigator. Many matches will be shown, including System Properties > UI Properties. This collection contains some very useful options, including how forms look and feel, whether list editing is enabled, and whether Insert and Stay is always available. You may want to spend some time and find out what they do.

Some properties are not categorized, but all are accessible by typing sys_properties.list in the filter-text box of the application navigator. This will give you a large list-over 1000 in Helsinki.

Note

This book will guide you to the more relevant properties, but many are documented in the product documentation: https://docs.servicenow.com/administer/reference_pages/reference/r_AvailableSystemProperties.html

You have been reading a chapter from
Mastering ServiceNow - Second Edition
Published in: Oct 2016
Publisher: Packt
ISBN-13: 9781786465955
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image