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
New Participant
April 20, 2022
Solved

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

  • April 20, 2022
  • 2 replies
  • 1114 views

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.
Best answer by _Manoj_Kumar_

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.

2 replies

Sukrity_Wadhwa
Employee
May 18, 2022

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
_Manoj_Kumar_
_Manoj_Kumar_Accepted solution
New Participant
April 22, 2022

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