Question 1mediummultiple choice
Read the full Creating and customizing tables and data explanation →SNOW-CAD Creating and customizing tables and data • Complete Question Bank
Complete SNOW-CAD Creating and customizing tables and data question bank — all 0 questions with answers and detailed explanations.
Refer to the exhibit.
Table: u_custom_asset
Fields:
u_asset_tag: string (max length 50)
u_serial_number: string (max length 100)
u_model: reference to cmdb_model
u_cost: currency
Business rule: Before insert on u_custom_asset
Script:
(function executeRule(current, previous /*null when async*/) {
if (!current.u_asset_tag) {
var gr = new GlideRecord('u_custom_asset');
gr.addQuery('u_asset_tag', 'CONTAINS', 'AST-');
gr.orderByDesc('sys_created_on');
gr.query();
if (gr.next()) {
var lastTag = gr.u_asset_tag.toString();
var num = parseInt(lastTag.substring(4)) + 1;
current.u_asset_tag = 'AST-' + num;
} else {
current.u_asset_tag = 'AST-1000';
}
}
})(current, previous);Refer to the exhibit.
Table: u_incident_task
Fields:
u_incident: reference to incident
u_task_type: choice (Investigation, Resolution, Documentation)
u_assigned_to: reference to sys_user
u_state: choice (Open, In Progress, Closed)
Client script: onChange on u_task_type
Script:
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue == '') {
return;
}
var ga = new GlideAjax('TaskTypeAjax');
ga.addParam('sysparm_name', 'getDefaultAssignedTo');
ga.addParam('sysparm_task_type', newValue);
ga.getXMLAnswer(function(answer) {
if (answer) {
g_form.setValue('u_assigned_to', answer);
}
});
}Drag steps to the numbered slots on the right, or tap a step then tap a slot.
Drag a concept onto its matching description — or click a concept then click the description.
Update set is being worked on
All changes have been captured and committed locally
Update set has been applied to the target instance
Update set will not be committed
Update set is being tested for conflicts
{
"name": "u_custom_field",
"internal_type": "integer",
"max_length": 100,
"label": "Custom Count"
}CREATE VIEW u_my_view AS SELECT sys_id, number, short_description FROM incident UNION SELECT sys_id, number, short_description FROM problem
current.u_field.setValue('test');
current.update();ERROR: Invalid field name: u_extra_field at line 12 of script include 'CustomTableUtils'