I'm trying to set up a rule to change the subject of a request to include the First/Last Name fields and the date of the Effective Date field I've added.
It works, the rule is fine. But I only want the date to show up as MM-DD, so 01-06 for January 6th.
// Adds Requester Name and Effective Date in the Subject Field
if($CS.isFormSubmit())
var FirstName=$CS.getValue("WorkOrder_Fields_UDF_CHAR28");
var LastName=$CS.getValue("WorkOrder_Fields_UDF_CHAR26");
var EffDate=$CS.getValue("GUDF_DATE2");
var subject=$CS.getValue("SUBJECT");
var new_sub= (EffDate + " " + subject + "-" + FirstName + " " + LastName);
if($CS.isFormSubmit()){ $CS.setValue("SUBJECT", new_sub);
}