Auto Populate Scheduled Start Time and End Time in Change Request

Auto Populate Scheduled Start Time and End Time in Change Request

We can now auto-populate the Scheduled Start Time and End Time in a change request using FAFR.

Under Admin>Change Template>Field and Form Rules, you can use the below scrips 

Scheduled Start Time 

var x=$CS.getValue("SCHEDULEDSTARTTIME");

if ( x === undefined)

{    

$CS.setValue("SCHEDULEDSTARTTIME",new Date());  


Scheduled End Time

var x=$CS.getValue("SCHEDULEDSTARTTIME");

if ( x === undefined)

{    

$CS.setValue("SCHEDULEDSTARTTIME",new Date());  

x=$CS.getValue("SCHEDULEDSTARTTIME");
$CS.setValue("SCHEDULEDENDTIME",x);

/* set days and hours from the current date*/
/* Date Field */
var fieldName='SCHEDULEDENDTIME';
/* you can choose the value 0 to 27 days*/
var nextDay=7;
/* you can choose the value 0 to 23 hours*/
var nextHour=0;
$CS.setDateFromCurrentDate(fieldName,nextDay,nextHour); 
        New to ADManager Plus?

          New to ADSelfService Plus?

            • Related Articles

            • Change Auto closure

              This will be helpful in auto closing change request after X days it is in review stage. This use case is more suitable in environments where ONLY Requesters (customers) are the Change Reviewers and they want the Change to be closed if no review is ...
            • Account specific request template: Redirection to requester's account based template from default template using FAFR

              Tested in builds 14000, 14200 and 14201 (Global FAFR): Step 1: In Global FAFR, on form load, configure an FAFR and execute the below script under Action as shown below, try{ $req.form.destroyForm(undefined, false); }catch(err){} ...
            • Script to Populate User Additional Field under Incident Template using FAFR

              The script load the Requester Name under Incident Additional field ( As a pick list), by choosing the requester name under additional field the script populates the user additional field value. * Kindly create two additional fields under Admin -> ...
            • Script to set fields from CSV using FAFR.

              Works in 10604 Requirement: Load Data from CSV depending on the value selected in an additional field. Usecase: Assume there are 3 additional fields for a request template, namely, "Reference number", "Payment type and "Vendor". "Reference number" is ...
            • Query to show Change Roles in change requests

              MSSQL: SELECT "chdt"."CHANGEID" AS "Change ID", "chdt"."TITLE" AS "Title", LONGTODATE("chdt"."CREATEDTIME") AS "Created Time", LONGTODATE("chdt"."SCHEDULEDSTARTTIME") AS "Scheduled Start Time", LONGTODATE("chdt"."SCHEDULEDENDTIME") AS "Scheduled ...