- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-04-2022 11:28 AM
Hi,
Can anyone tell me how can I add choices to input type Integer?
Regards
Suman P.
Solved! Go to Solution.
- Labels:
-
Change Management

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-04-2022 11:37 AM
Hi,
You'd access your field in dictionary, then scroll to the bottom, same as you see in your screenshots. Then...add the choices there.
Example showing when starting to make new field:
Currently, this has no choices:
Change dictionary tab for "Choice list specification to a selection, such as":
Now, add choices in dictionary, scroll down to related list:
And now it looks like this on the form:
Please mark reply as Helpful/Correct, if applicable. Thanks!
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-04-2022 11:29 AM
Hi,
Please see my reply below for details on how to add choices to integer field.
Please mark reply as Helpful/Correct, if applicable. Thanks!
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-04-2022 11:35 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-04-2022 11:37 AM
Hi,
You'd access your field in dictionary, then scroll to the bottom, same as you see in your screenshots. Then...add the choices there.
Example showing when starting to make new field:
Currently, this has no choices:
Change dictionary tab for "Choice list specification to a selection, such as":
Now, add choices in dictionary, scroll down to related list:
And now it looks like this on the form:
Please mark reply as Helpful/Correct, if applicable. Thanks!
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-04-2022 11:42 AM
Hi Allen,
By looking at the script, can you please tell me which table inputs are getting added to?
(function executeStep(inputs, outputs, stepResult, timeout) {
//set variables for all change inputs
var changeID = inputs.u_record.toString();
var bis_svc = inputs.u_ci_business_service;
var complex = inputs.u_complexity_of_change;
var dificult = inputs.u_difficult_to_revert;
var redundancy = inputs.u_redundancy_plan;
var verify = inputs.u_verification_change;
var justCreatedGR = new GlideRecord('change_request');
if (justCreatedGR.get(changeID)) {//get change record to pull fields o who will take they survey.
//create assessment
var metricType = '2e3ab7f1d7033200532c24837e61034b'; //sys_id of the metric type you can find in change_risk_asmt table
var assessmentDetails = new ChangeRiskAsmtSNC()._createAsmt(metricType, justCreatedGR.sys_id, justCreatedGR.assigned_to);
var asmtInstanceSysId = assessmentDetails; //survey sys_id
//set response in assessment questions
var setResponse = new GlideRecord('asmt_assessment_instance_question');
setResponse.addQuery('instance', asmtInstanceSysId);
setResponse.query();
while (setResponse.next()) { //set assessment answers
if (setResponse.metric.name == 'Complexity of change') {
setResponse.value = complex;
} else if (setResponse.metric.name == 'Difficult to revert') {
setResponse.value = dificult;
} else if (setResponse.metric.name == 'Verification of change') {
setResponse.value = verify;
} else if (setResponse.metric.name == 'Affect critical CI or Business Service') {
setResponse.value = bis_svc;
} else {
setResponse.value = redundancy;
}
setResponse.update();
}
//set assessment to complete and link to task id
var justUpdatedInst = new GlideRecord('asmt_assessment_instance');
if (justUpdatedInst.get(asmtInstanceSysId)) {
justUpdatedInst.state = "complete";
justUpdatedInst.task_id = changeID;
justUpdatedInst.update();
}
//calculate assessment result and update change record with calculated risk
var calculatedRisk = new global.RiskCalculator(justCreatedGR).evaluateRiskImpact();
if (calculatedRisk.riskEvaluation.risk.value == 4 || calculatedRisk.riskEvaluation.risk.value == 3 ||
calculatedRisk.riskEvaluation.risk.value == 2) {//Check is asessment returned one of the expected values
stepResult.setOutputMessage("calculatedRisk.risk " + calculatedRisk.riskEvaluation.risk.value);
justCreatedGR.risk = calculatedRisk.riskEvaluation.risk.value;
justCreatedGR.update();
}
stepResult.setSuccess();//successful test
return;
} else {
stepResult.setOutputMessage("Failed to calculate risk");
stepResult.setFailed(); // fail the step
}
}(inputs, outputs, stepResult, timeout));