Mautic Community Forums

How to add current date and time to custom field in Update contact action

Your software
My Mautic version is: 2.16.0 - Docker Hub Install
My PHP version is: 7.1.33

Your problem
My problem is:

I want to fill a custom field (Date/Time) with current date and time in a campaign, when the contact has clicked on the the link (Visits a page) in the welcome mail. How is the Mautic way to do this? The trigger works.

I indent to document the contact opt in date thereby. GDPR/DSGVO you know. :slight_smile:

These errors are showing in the log: -

Steps I have tried to fix the problem:

I setup an Update contact step in the campaign builder, but I cannot setup a relative date to fill in. I have found the idea to setup a database trigger, but I dislike this idea, as its not visible in the campaign.

Is there a way to solve this?

Thank you for your help.

Best regards, Mario

Hi Mario,

I am not aware of a solution - thus the proposed feature Dynamic ("Calculated") Values in Campaign Actions
What we do as a workaround is to store the date&time when the form has been sent (https://www.leuchtfeuer.com/en/mautic-know-how/mautic/dynamic-values-in-mautic-forms-date-time-url)

Best,
Ekke


Subscribe to the Mautic Podcast at www.Mauticast.com - and let me know what topics or interviews you would like to hear!
(German version at www.Mauticast.de)

1 Like