Book Image

Learning ServiceNow. - Second Edition

5 (1)
Book Image

Learning ServiceNow. - Second Edition

5 (1)

Overview of this book

This book is an updated version of Learning ServiceNow, that will cover the new and updated features of the ServiceNow platform. It will show you how to put important ServiceNow features to work in the real world, while introducing key concepts via examples of managing and automating IT services. It'll help you build a solid foundation of knowledge, and will demonstrate how to effectively implement and configure modules within ServiceNow. We'll show you how to configure and administer your instance, and then move on to building strong user interfaces and creating powerful workflows. We also cover other key elements of ServiceNow, such as notifications, security, reporting, and custom development. You will learn how to improve and automate your business' workflow and processes. By the end of this book, you will be able to successfully configure and manage ServiceNow like a pro.
Table of Contents (19 chapters)
Learning ServiceNow Second Edition
Contributors
Preface
Index

Default versus calculated field values


It is an easy mistake to make, to think that giving a table column (AKA field) a default value, and giving it a calculated value, have effectively the same result. However, this is not the case. Default and calculated values behave quite differently, and should be used for quite different purposes.

In this section, we'll explore what each are (and are not) meant to be used for, and the difference in behavior between them. We'll also discuss field calculation scripts, and best practices regarding default and calculated fields.

Default values

Default field values can be quite simple: a string, an integer, or whatever data-type matches the field's type.

You can get a fair bit more advanced with it though, by using the javascript: keyword in the beginning of your value similar to the way we can run scripts in the condition builder. Any code after the javascript: would be executed on the server when the form loads, or when a record is inserted into the database...