Blog

Creating a ServiceNow Training Application

If you haven't created a new application in ServiceNow before, you may be surprised how easy the process is.

In this example, I'll create a training application from scratch. You can use the training application to train new users on ServiceNow or other products/procedures at your company. Even if you don't need a training application, it is a good example of the application creation process.

CODE

Create the Training Application

  1. Application Creator
    - Name: Aeritae Training
    - User Role: itil
  2. Tables > New
    -Label: Aeritae Training
    -Name: u_aeritae_traing
    -Extends base table: task
    -User Role: itil
  3. Modules
    Title | Table | Active | Order | Link type | Filter | Arguments
    Aeritae Training | u_aeritae_training | false | | List of Records | |
    Create New | u_aeritae_training | true | 100 | URL (from Arguments:) | | u_aeritae_training.do?sys_id=-1&sysparm_query=active=true&sysparm_stack=u_aeritae_training_list.do?sysparm_query=active=true
    Assigned to me | u_aeritae_training | true | 150 | List of Records | active=true^assigned_to=javascript:getMyAssignments() | active=true^assigned_to=javascript:gs.user_id()
    Open - Unassigned | u_aeritae_training | true | 300 | List of Records | assigned_to=NULL^active=true^EQ | assigned_to=NULL^active=true
    Closed | u_aeritae_training | true | 350 | List of Records | active=false^EQ |
    All | u_aeritae_training | true | 400 | List of Records | |

Setup Training Form and Lists

  1. Number Maintenance
    - Table: u_aeritae_training
    - Prefix: LEARN
    - Number of digits: 7
    - Number: 10,000
  2. Setup Training Form
    - Personalize Form
    Number
    State
    Assigned to
    |- split -|
    Category (NEW FIELD: Choice)
    Difficulty (NEW FIELD: Choice)
    Priority
    |- end split -|
    Short Description
    Description
    Answer (NEW FIELD: String(4000))
    Work notes
    Activities (filtered)
  3. List Layout setup: Number, State, Category, Description, Assigned to
  4. Choice List for State Field
    Table | Element | Language | Value | Label | Inactive
    u_aeritae_training | state | en | 1 | Open | FALSE
    u_aeritae_training | state | en | 4 | Ready for Review | FALSE
    u_aeritae_training | state | en | 2 | Work in Progress | FALSE
    u_aeritae_training | state | en | 3 | Closed Complete | FALSE
  5. Auditing on
    - Dictionary, u_aeritae_training, collection. Set Audit to true.
  6. Business Rule, WIP Set
    Name: WIP Set
    When: before
    Insert/Update: true
    Condition: current.assigned_to.changes()
    Script: 
    setWIP();
    function setWIP () {
    	if (current.assigned_to.nil() && current.state != 3 && current.state != 4) {
    	 current.state = 1;
    	}
    	else if (!current.assigned_to.nil() && current.state != 3 && current.state != 4) {
    	 current.state = 2;
    	}
    }

Create a Transform Map and upload data

Example Screens