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

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);
}

2 Replies

Avatar

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.

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!