Module 4.1-4.2 Flashcards
All new tables have this?
A default list and a default form
For tables that extend another table, the fields on the default list and form depend on what?
The base table’s fields
Where do you go to add a field to a table?
Studio
Steps to adding a field to a table?
Insert a new row which adds a new column
Provide a column label (field name) and type
Capitalize only the first letter of the first word in the label
How do you define a field’s data type?
Double click in the cell
Click the magnifying glass to bring up a list of field classes
Click the green check mark
What are the 5 common field data types?
Date/time
Decimal
Reference
String
True/face
A field data type which features a day and time of day, which can be selected by a calendar widget?
Date/ time
A field data type that features a number with up to two decimal places , (ex: 12.34)
Decimal
A field data type that features a query that displays records from another table?
Reference
A field data type that features a character string?
String
A field data type that features a Boolean field represented by a checkbox?
True/false
What type of data field type should you usually avoids?
Free form unless it’s explicitly necessary
What shouldn’t you use string fields for?
-Dates
-Fields that reference people by name
-Reference objects
When should you use string fields?
When consistent or specially formatted data is not required
What field types should you use to limit options?
Choice lists and reference fields
You should only display fields for data you need (t/f)
True
Why should you choose a field type carefully?
Changing the field type can result in data loss
Before creating a new field, determine if a new field is necessary. If you are extending an existing table, what should you do first?
Consider using or repurposing an existing field
Configuring the label on a field (of an extended table) changes the label only for the current table and not __________?
The parent table
Changing the label on a field of an extended table should be done in caution, why?
The change is only made to the label and not the column name which can cause confusion
Can you combine two fields in one?
Yes it’s called a decision field
How can user-defined fields be deleted from a table?
By clicking the red x button that appears to the left of the column field
These fields cannot be deleted?
Inherited
Are table records deleted when a field is deleted?
No
Where are new fields automatically added?
To the bottom of the form
Are new fields automatically to the list?
No
How do you add new columns to a list?
The personalize gear
What is the primary way users interact with an application?
A form
Why must users have a good experience when using an application?
So that they will easily adapt to using it
How should forms read?
Top to bottom
How do you break up long forms?
With annotations and sections
What kind of layout should you use for larger text fields?
Full width single column
If using a two column layout should it be placed at the top or bottom of a form?
Top
Where should a reference number/ name be placed on a form?
At the top
Where should important fields be placed on a form?
The top
Logical groupings of fields should be placed where?
I’m sections
What should you have to offers guidance on forms?
Tool tips
Fields should be displayed in logical groups (t/f)
True
Form layout orders should reflect what?
The process flow
When a form is in tabbed mode (baseline), can users see all the fields at the same time?
No
When do tabs appear on a form?
When there are two or more sections
What is the default behavior of the form in regards to tabs?
The default is to display a tabbed layout
How to take off automatic tabbed settings on forms?
Click user avatar
Select preferences
Click on display title
Move slider to left to disable displaying form sections as tabs
Keep field labels short. What should you use for longer descriptions?
Hint
Annotation or
Help fields
Where do you go to change a field’s label?
Forms & UI> Forms> Form name
Select gear
Add a new value in the label field
Keep tool tips short (one line or less). They’re only visible for a few seconds. (T/F)
True
What do tool tips help do?
Clarify what information a user should enter
How to specify a new field’s hint?
Right click on field and select configure label
Enter mouse over text in the hint field
Provide real time (immediate and targeted) feedback on form with these two scripting options?
Client scripts
UI action scrips
What are the five ways to add real time feedback on a form?
- g_form.showFieldMsg()
- g_form.addInfoMessage()
- g_add.ErrorMessage()
- alert
- confirm
Prints a message on a blue background below the field passed on a method call
g_form.showFieldMsg()
Prints a message on a blue background to the top of the current form
g_form.addInfoMessage()
Prints a message on a red background at the top of the current form
g_form.addErrorMessage()
A JavaScript method that opens a dialog box with an ok button
alert()
A JavaScript method that opens a dialog with ok and cancel buttons
confirm()
Field styles add what to a form?
Visual impact
What are 3 examples of field styles?
-field color
-font attribute (bold, italic)
-text alignment
How do you stylize a field?
In studio, create a new style
Allows different users to see form data in different ways?
Views
A saved version of a configured form or list
View
This role can create any number of views for a form or list?
Admin
Where does the view name appear on a form?
In square brackets [ ] next to the form name
When in the default view of a form what view name is displayed?
None
Client scripts and ui policy scripts can execute selectively based on views (t/f)
True
Consider creating standard views for these 3:
-Default
-Mobile
-ESS
This role is required to change views
view_changer
What are the 3 sections of form design?
- field navigator
- header
- form layout
This a tool for creating and modifying forms
Form design
How to open form design?
In Studio open
Forms & UI> forms> form name
Or
Additional actions context menu located on form
Form design allows you to create, modify, delete and drag, drop and configure what on a form?
-fields
-views
-sections/tabs
Views can be created but not _______ in form design
Deleted
The form layout contains a cell for each section, field, annotation, UI element, and __________ on a form
Related list
How do you add fields to a form using form layout?
Select a field’s handle in the field tab then drag and drop to the desired location on the form
Removing a field removes the field from the form but does not delete __________?
The column from the table in the database
You can hover over a field to enable the action buttons for a field. What are those 2 buttons?
Edit properties
Remove
Editing field properties make changes to the _______
Database
Available field properties depend on what?
The field data type
Field properties modify the dictionaries entry for the selected field. Changes to field properties are not committed until what?
The form design is saved
Why do you use annotations?
To add information, instructions, or separators to a form
What are the 6 types of annotations?
- info box blue
- info box red
- line separator
- section details
- section separator
- text
A section without a title is a continuation of what?
The last section with a title
Sections without titles allow what on a form?
Allows you to combine multiple layout formats
Where do go to create a new form view?
Form designer header then view picker
How do you delete a form view?
System ui> forms
Open table and view
Select delete
What benefits does scripting have to service now?
Enhances user experience, extends existing functionality, add new functionality to apps
Place the cursor in a particular field on form load
Send email notifications
Write to log files
Validate data
Prompt users: alerts/ confirmation/ messages
Add widgets to forms and lists
All is possible how?
Scripting
What is client side scripting used for in ServiceNow?
Manage forms and form fields
Trigger specifies ______ to execute
When
What does server side scripting do in ServiceNow?
Manage the database and backend
Scripts in ServiceNow either execute on the client’s browser or in the servicenow _______
Backend
Why is it important to know where a script will execute?
There are different api’s for client and server side scripts
Scripting specifies ______ to do
what
All scripts have a trigger specifying when a script’s logic should execute. The trigger configuration fields depend on what?
The script type
This field on a client script form is for documentation and informational purposes. Includes information like who wrote the script, what business requirement the script is for, and any other pertinent information
Description
This field on a client script form is used for localization.
Messages
This field on a client script form is used to script what needs to happen when the conditions in the trigger are met
Script
Client side logic governing form and field behavior. Has a condition which must be true in order to execute. Defines the behavior and visibility of fields on a form without scripting.
UI Policy
Client scripts can also hide fields, show fields, and make fields mandatory but still always use a UI policy instead of a client script. Why?
For faster load times
UI policies do not have a name field instead use this field _______ as a pseudo name
Short description field
UI policy application field identifies the scope of the UI policy. It’s important to correctly identify the ui policy’s scope to ensure the logic does not do what?
Inadvertently impact other areas of servicenow
This field contains a short explanation of what the UI policy it’s for. The value in this field appears in the debugging information.
Short description
UI policies execute based on evaluation of what?
their condition
You should build conditions with the ___________ rather than scripting for better performance
Condition builder
If UI policy trigger conditions are ______ the ui policy will always execute
Blank
The condition builder is not unique to UI policies. The same filter is also used where?
Survey administration, SLAs, list filters, report conditions, and more
When are trigger conditions rechecked?
Only if a user manually changes a field on a form
What do you use that’s not scriptable to manage the mandatory and read only state of fields for records not changed on a form?
Data policies
How do you create an ui policy action?
Studio > client development > ui policies > open policy> new
With ui policy actions what are the field attributes you can set?
Mandatory, visible (show or hide), read only
Where do ui policy scripts execute?
Client side
Although fields can be hidden with ui policy actions, sections cannot. What is required to show/hide sections?
Scripting
In addition to the fields from the default view the advanced view on a ui policy has global, view, reverse if false, on load, and inherit. How does one see those additional options?
The advanced view related list
The ui policy applies to all views if this is selected?
Global
This field shows the name of the view to which the ui policy script applies?
View
If the global box on a ui policy advanced form is not selected, you must specify what?
The view to which the ui policy applies
The view option on a ui policy advance form is only visible when what?
Global is not selected
Select the ui policy view before creating the ui policy actions and/ or script because a script can only act on fields that are?
Apart of the selected form view
If you do not select the global checkbox on a ui policy form AND you leave the view field blank what happens?
The script applies to the default view
Ui policy actions are reversed and the execute if false script executes when it’s ui policy’s conditions evaluate to false
Reverse if false
Check this if you want a ui policy action to execute on form load AND form change
On load
Select this checkbox on a ui policy form to apply this script to any extended tables when selected
Inherit
With ui policy scripting, the script tab only appears where?
The advanced view
With ui policy scripting, you have to select this option to access the scripting fields?
Run scripts
You can write a ui policy in both fields in the advanced view. What fields are they?
Execute if true
Execute if false
JavaScript that executes when the ui policy condition tests true?
Execute if true
JavaScript that executes when the ui policy condition tests false?
Execute if false
This advanced view ui policy option must be selected in order for the execute if false script to execute?
Reverse if false
This function in the appropriate ui policy fields is automatically called when the condition returns true or false
onCondition()
Where do servicenow client scripts execute?
In a browser
Client scripts manage ______ and ______ in real time
Forms and form fields
Modify choice list options
Set one field in response to another in real time
Hide/show form sections
Display an alert
Make fields mandatory
Hide fields
….. all can be done, how?
With client scripts
Although modern browsers all interpret JavaScript the same way, you may still experience what regarding client side scripts?
Browser dependent behavior
Script runs when a form meeting the trigger condition loads and before access is given to the user
onLoad()
Script runs when a form meeting the trigger condition is saved, updated, or submitted
onSubmit()
Script runs when a particular field’s value on a form changes
onChange()
These scripts are usually used to pre populate fields with values and make other form appearance and content modifications. While ________ executes users have no ability to modify form fields.
onLoad()
These client scripts are used to perform data validation against multiple fields simultaneously. Users have no access to a forms fields while ______ client scripts execute
onSubmit()
These client scripts are used to validate a field’s value in real time or to set or modify fields values in response to another field changing
onChange()
These client scripts execute script logic when forms are loaded. Use these client scripts to manipulate a form’s appearance or content. Use these client scripts sparingly as they impact form load times.
onLoad()
These client scripts execute script logic when a particular field’s value changes. Use these client scripts to respond to field values of interest and to modify another field’s value or attributes.
onChange()
These client scripts execute script logic when a form is submitted. Use these client scripts to validate field values.
onSubmit()
Trigger conditions must be met for client scripts to execute (t/f)
True
On a client script form, select this to decide whether or not the script executes for desktop and table or mobile or both
UI type
Client side scripting object whose properties are the fields from a form’s table. It’s property values are the field values. It contains methods for managing form fields and values.
GlideForm g_form
Client side scripting object whose property/values are information about the current user. Contains methods for checking roles for the current user. Used to personalize user experience.
GlideUser g_user
Because g_user executes client side. Impersonation will affect results. (T/f)
True
The g_form and g_user objects are automatically instantiated for client side scripts (t/f)
True
Servicenow has scripting assistance which displays a list of selectable elements in a script field. Press _______ to display a list of classes. Help is displayed when you highlight a object or property.
Ctrl+ spacebar
Servicenow has scripting assistance which displays a list of selectable elements in a script field. Type a class name followed by a _______ to select a list of properties. Help is displayed when you highlight a object or property.
Period
Scoped client scripts execute different than global client scripts. Scoped client scripts are wrapped in an immediately- invoked function expression (IFE). As a result, what happens?
certain APIs are either modified or unavailable altogether
Inaccessible APIs can be made accessible on an per application basis. To do this set the system property glide.script.block.client.global scope to ______ in the application.
False
GlideRecord is the only API that cannot be turned back on. _______ can be used as a replacement for GlideRecord
GlideAjax
What are the inaccessible APIs?
GlideRecord
Window
Document
$
$$
jQuery
$j
$f
What are the modified APIs?
GlideAjax
GlideForm
GlideDialogWindow
UI policies execute AFTER client scripts (t/f)
True
Executes on form load.
UI policy or Client script?
Both
Executes on form save/submit/ update.
UI policy or Client script?
Client script
Execute on form field value change?
UI policy or Client script?
Both
Have access to a field’s prior value?
UI policy or Client script?
Client script
Execute on list field value change?
UI policy or Client script?
Client script
Requires scripting
UI policy or Client script?
Client script
Do client scripts and ui policies use the same api?
Yes
The server side script access control trigger is based on what?
Operation
The server side script business rules trigger is based on what?
Database accesses
Insert/update/delete/query
Before/after/display/async
The server side script schedule jobs trigger is based on what?
A schedule
The server side script Script Action triggers when
Events are generated
The server side script Script Includes trigger when
When called
The server side script UI actions triggers when
A user clicks on a widget
The server side script workflow/ flow triggers when
The condition is met
Why aren’t GlideForm and glideuser classes available server side?
They are apart of client side apis
Display business rules pass data from the server side to a client side script using what?
The g_scratchpad object
The g_scratchpad object has no properties by default and must be populated by what?
A display business rule
Does g_scratcgpad exist on the mobile platform?
No
Any client side script can use the g_scratchpad object passed in from the server (t/f)
True
All display business rules/ g_scratchpad property must be passed as a string?
Yes