Form designer

Let's start by creating a virtual war room record. Follow the following steps to create a record in our application that we can use to create and modify views using the form designer:

  1. In the application navigator filter text box, type Virtual War Room, and you'll see the virtual war room application header, as well as the Virtual War Rooms module.
  2. Click on that module, and then click New at the top of the list, to see the virtual war room form and create a new record.
  3. Enter Beth Anglin in the Assigned to field (this is a random default user included with the demo data in your development instance).
  4. Click the magnifying glass next to the Configuration item field, and select any random configuration item from the built-in demo data.
  5. Enter something for the Short description like test war room and something for the Description like this is a test ticket for the war room application.
  6. Click Submit. This will return you to the list view.
  7. Click on the Virtual War Room ticket you've just created, to go back to the form.

All of the fields you'll see on that form, are actually fields derived from the Task table. In fact, aside from the base system fields (Created, Created by, Updated, Updated by, and a few others) and our newly created Major incident field, all other fields were derived from the Task table.

You'll notice on this form, a number of fields and field types, including but not limited to the following:

  • The Number field, which is a String type.
  • The Assigned to field, which is a Reference type (that points to the Users table).
  • The Short description field which is a String type that spans two layout columns.
The difference between the Short description and Description fields, is the maximum length value from the field's dictionary entry. If a String field has a max length of 255 or less, it will appear as a Single line or small field. However, if its max length is 256 or greater, it'll be a multi-line field on the form.
  • The Active field, which is a True/false (AKA boolean) type.
  • The State field, which is an Integer field with a drop-down choice list.
Though the State field is technically an Integer type (meaning that the actual value in the database is an integer), the choices that can be selected are actually stored in another table, labeled Choices (with the name sys_choice). This table has records that, like the table itself, have both a label, and a value. The label is what you see in the State field stop-down (Open, Closed, Work in Progress, and so on) but the value is what is actually stored in the field, and in the database.

For the virtual war room, we're not going to need all of these fields - and anyway, this form doesn't even display out Major incident field! Let's fix that, by following the steps below:

  1. Right-click on the form header, and go to Configure| Form Design. This will open the Form Designer, a handy little app within ServiceNow.
  2. Since we want all virtual war rooms to only exist for major incidents of the highest priority, we don't really need a Priority field on the war room itself. Go ahead and click the little icon to the right of the Priority field when you hover over it.
  3. Use the same method to remove the Active field, as well as Parent, Short description, and Description. We are going to want a short description and description on the form, but we'll get it from the Major incident.
  1. Now let's add our Major incident field to the form. Filter the list of fields on the left to find it, and drag the Major incident field to the right, placing it right underneath State.
    1. Finally, add the Activities (filtered) (Formatter) just under Work notes at the bottom. This is going to display your journal. More on this and activities in Chapter 5Tasks and Workflows.

At this point, your form designer window should be looking something like this:

Go ahead and click the blue Save button at the top-right of the page, and return to the tab you were on previously. Right-click the header, and reload the form, and you should see your new, brilliantly designed form. Well done!

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
52.15.160.43