Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

util.scand returns null


Level 1


I am facing weird situation. There is one dynamic PDF created using LiveCysle designer 8.5 and used by many users.

I have used one of line code: var recDate = util.scand("mm/dd/yyyy', Page1.ReceivedDate.formattedValue);

This line returns NULL for one user but working fine for rest of the users. All are using the same PDF.

See the below screen print:


Page1.ReceivedDate.formattedValue is:


When I use the same PDF on my machine, I see ( here I have used different date, if I give the same date result be in the same format 😞

Please advise why there are two ouputs for same line of code.Capture.JPG

2 Replies


Level 1


As your parameter passed to util.scand is  "mm/dd/yyyy', so your "Page1.ReceivedDate.formattedValue" should be  "06/25/2014"  i.e. length should be same as string (mmddyyy).


Level 10


It would seem the ReceivedDate field is set to use the system default locale on the Field tab, so is dependent on the user settings.  You might want to change your code to use the rawValue property which is not dependent on the locale by defined by the data pattern for the field, which defaults to yyyy-mm-dd.