Expand my Community achievements bar.

SOLVED

Populating the date field

Avatar

Community user

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.