Adobe Campaign Standard: How can we set attribute value to submission datetime on submit of button on LP in ACS? | Community
Skip to main content
SachinDhir
Level 2
Apr 20, 2022 5:53 AM UTC
Solved

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

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

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
_Manoj_Kumar_
_Manoj_Kumar_Accepted solution
New Participant
Apr 22, 2022 12:41 AM UTC

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

2 replies

Sukrity_Wadhwa
Employee
May 18, 2022 10:59 AM UTC

Hi @sachindhir,

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

Thanks!

Translate
Sukrity Wadhwa
_Manoj_Kumar_
_Manoj_Kumar_Accepted solution
New Participant
Apr 22, 2022 12:41 AM UTC

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.

Translate
     Manoj     Find me on LinkedIn