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

[AEM Gems Webinar] Accelerating Experience Manager as a Cloud Service development with Rapid Development Environments
Adobe Summit 2023 | Complete list of AEM Sessions & Labs
SOLVED

Populating the date field

Avatar

Level 3

Hi All,  I am trying to populate the "datefield" (cv58) when the "validated" field (cv55) is set to a specific string from the dropdown menu. I have used the following code in the change event of (cv55).    if (form1.P1.client.variable_option_client.cv55.rawValue == "Validated")      then form1.P1.client.variable_option_client.cv58.rawValue = num2date(date(), "YYYY-MM-DD") endif  if (form1.P1.client.variable_option_client.cv55.rawValue == "Pending" OR form1.P1.client.variable_option_client.cv55.rawValue == "Not Validated"      OR form1.P1.client.variable_option_client.cv55.rawValue == "null")      then form1.P1.client.variable_option_client.cv58.rawValue = "null" endif     This does not pupulate anything into my datefield.  I need the datefield to populate with today's date when (cv55) is set to "Validated" else it should not not set the date to anything.  Please help  Joey

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi,

the rawValue is only applied when you exit the drop down box.

Use xfa.event.newText instead.

View solution in original post

2 Replies

Avatar

Correct answer by
Level 10

Hi,

the rawValue is only applied when you exit the drop down box.

Use xfa.event.newText instead.