Problem using GetUserOption - not picking up system default
Hi all, using PT8.54.03 on Oracle 11g and getting the following...
PeopleCode
Local string &DateFormat = GetUserOption("PPTL", "DFRMT");
Local string &DateSeparator = GetUserOption("PPTL", "DTSP");
Local string &sDispFormat;
Local string &postedDate;
If None(&DateSeparator) Then
&DateSeparator = "/";
End-If;
Evaluate &DateFormat
When = "D"
&sDispFormat = "dd" | &DateSeparator | "MM" | &DateSeparator | "yyyy";
Break;
When = "M"
&sDispFormat = "MM" | &DateSeparator | "dd" | &DateSeparator | "yyyy";
Break;
When = "Y"
&sDispFormat = "yyyy" | &DateSeparator | "MM" | &DateSeparator | "dd";
Break;
When-Other
&sDispFormat = "MM/dd/yyyy";
Break;
End-Evaluate;
WinMessage ("Format: " | &DateFormat | " | Separator: " | &DateSeparator | " | Result: " | &sDispFormat);
My Personalisations
Global Settings
Expected Result
Format: D | Separator: - | Result: dd-MM-yyyy
Actual Result
Format: M | Separator: / | Result: MM/dd/yyyy