Expand my Community achievements bar.

SOLVED

Adobe Campaign Standard: How can we set attribute value to submission datetime on submit of button on LP in ACS?

Avatar

Level 2

We tried setting using Additional data but looks like ACS treats values in Addtional data field as text, so can't evaluate GetDate() function.

 

Additionally, tried luck by setting the value through document controller (the way it can be done in AC classic), but even that is not working.

 

function setSubmissionDate()
{
var date = new Date();
console.log(date);
document.controller.setValue('/context/profile/OptoutDate', date);
}

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hello @SachinDhir 
If you are preloading the data then create the hidden field and map it to the date field in your schema. Then use the JS to populate the value of this field.

If the data is not preloading, Then save the date as a string in your schema, and in the WF change the data type for manipulation OR create 2 fields in schema one with the date data type and the other string. Then create a separate WF to update values from the string column to the date column.


     Manoj
     Find me on LinkedIn

View solution in original post

2 Replies

Avatar

Correct answer by
Community Advisor

Hello @SachinDhir 
If you are preloading the data then create the hidden field and map it to the date field in your schema. Then use the JS to populate the value of this field.

If the data is not preloading, Then save the date as a string in your schema, and in the WF change the data type for manipulation OR create 2 fields in schema one with the date data type and the other string. Then create a separate WF to update values from the string column to the date column.


     Manoj
     Find me on LinkedIn

Avatar

Administrator

Hi @SachinDhir,

Was the given solution helpful to resolve your query or do you still need more help here? Do let us know.

Thanks!



Sukrity Wadhwa