Modify format date is displayed in email

Syrax12

17-02-2015

I'm using the following script to customize the email submission of a form:

var oDoc = event.target;

oDoc.mailDoc({

bUI: true,

cTo: "user@company.com",

cSubject: "New CCR Form submitted on " + CurrentDate.rawValue + " by " + teamLead.rawValue,

cMsg: teamLead.rawValue + " has submitted a new Change Control Request form."+"\nPlease review and complete the Impact Assessment section, and if approved, submit to the IT Manager for further approval.\n\nREQID:"  + REQID.rawValue + "\nDue Date: " + dueDate.rawValue + "\nPriority: " + priority.rawValue,

});

It runs fine and formats the email as expected, the only issue I have is how the date is displayed in the email. The CurrentDate.rawValue in the subject line displays how I want it to, e.g. 02/17/15, but the dueDate.rawValue displays as 2015-02-17, even though the pattern setting in the document is mm/dd/yy and displays correctly in the form itself. Any idea why the date is changing it's display pattern when generating the email and how to fix it?

Accepted Solutions (1)

Accepted Solutions (1)

Magus069

MVP

17-02-2015

Hi there,

I am not sure if that could cause an issue, but does both fields have a display and edit pattern??

Sometimes an error is caused because there is no edit pattern for date fields...

Otherwise, you could also have the display pattern you wish to display in the email for both fields and have the formattedValue instead of the rawValue

Hope this help

Answers (4)

Answers (4)