Widget Server Script

This is where you put the server-side logic for your widget. This is helpful primarily with interacting with the Glide platform through ServiceNow server-side APIs.

if (input) {
    var r = new RESTMessage('Yahoo Finance', 'get');
    r.setStringParameter('symbol', input.symbol);
    var response = r.execute();
    data.price = response.getBody();
}

This code will be executed within the context of the widget instance related to it.

Server-side properties and helpers

Property Description
input An object containing client-side properties set under c.data. It will have an undefined value until the client-side controller calls c.server.update()
data An object containing properties set during server-side execution
options An object containing the schema option properties
$sp Helper class used to access server script API

Error: Please enter a valid email address

Error: Invalid email

Error: Please enter your first name

Error: Please enter your last name

Error: Please enter a username

Error: Please enter a password

Error: Please confirm your password

Error: Password and password confirmation do not match