Skip to Content
0

Ado form: Custom date format based on /1BCDWB/DOCPARAMS-land1

Jun 26, 2017 at 03:09 PM

42

avatar image

Hello Gurus

I need to have the dates format based on the country pass has parameter.

The current dates format available in the display pattern have only 2 digits for the year.

What I need is to display the date format based on the country set in /1BCDWB/DOCPARAMS-land1

Example:

Land1 Date format (display only)

US "MM/DD/YYYY"

CA "DD/MM/YYYY"

Is it possible to do it without having to perform coding in XML?

The field is in display only and will not be fillable.

All suggestions will be highly appreciated.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Daniel St-Jacques Aug 29, 2017 at 01:46 PM
0

Problem solved.

At the initialization event of the field add the following Formcalc code.

if ( $record.yourlandfield eq "CA" ) then

$.rawValue = Format( "DD/MM/YYYY", $.rawValue )

else

$.rawValue = Format( "MM/DD/YYYY", $.rawValue )

endif

Share
10 |10000 characters needed characters left characters exceeded