Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

function in a rawValue

Avatar

Level 5

The below script allows me to place a date from mm-dd-yyyy format e.g. 05-17-2004 into Month Day, Year format, e.g. May 17, 2004. I used a Script Object function to convert the date. However how do I run the function inside the textfield.rawValue =  without the script giving me an "undefined".

//Letter References Content

form1.Textfield.rawValue = "(a) Your previous Letter, RA-XX dated " + SOdateConverter.fxdateconverter(form1.Submissiondate.rawValue,LONGDATE) + LONGDATE.value + "\n\n" + "(b) GPA LOA " + form1.loaTrackingnumber.rawValue + ", GPA Letter Number 10B-XX dated " + SOdateConverter.fxdateconverter(form1.loaDate.rawValue,LONGDATE) + LONGDATE.value + ".";

Better said this script outputs the folloowing

(a) Letter RA-XX-XXXX dated undefinedApril19, 2010

(b) GPA LOA N129EDPO, GPA Letter Number 104B-XX-XXXX dated undefinedMay 22, 2010

I want to remove the undefineds. I tried placing the function in brackets

{SOdateConverter.fxdateconverter(form1.Submissiondate.rawValue,LONGDATE)}

did not work.

Any ideas?

1 Reply

Avatar

Level 1

Any chance you can post a link to the form (letter) using something like dropbox or acrobat.com - I'd be happy to solve it for you.

cheers

techtaketwo