Updating form comment field without overwriting current data

Anonymous
Not applicable

Updating form comment field without overwriting current data

Hello Community,

I am looking to update a form comment field (aka, textbox) with new text, without overwriting the current text in that field.  Does anyone know the Marketo flow 'change data value' code that would allow me to do this?

Here's my use case:

We have a web form (contact us) with an open comment box. The first time a lead fills out the form, all data gets collected and passed along to SFDC.  But if that same lead fills out the form again, their new comment will overwrite their first one.

What I would like to do is to quickly capture the current value in the comment field and append it to the bottom of the new response. This way I don't lose any data, and can see the full history of all comments submitted.

Thanks

6 REPLIES 6
SanfordWhiteman
Level 10 - Community Moderator

Re: Updating form comment field without overwriting current data

A history field.

A separate textarea field that you append to: Change Data Value to

{{lead.new comment}} {{lead.comment history}}

For best results I recommend my line break token in-between (search the Nation).

Grace_Brebner3
Level 10

Re: Updating form comment field without overwriting current data

Hey Todd Plunk​,

This is possible, with a little extra step in between.

You're going to need two comment fields: one, linked to the form, will always only show the latest comment value (because form field submissions will overwrite, not append); and a second, linked to SFDC, will show the combined history of all comments.

You can then create a smart campaign triggered off changes to the latest comment field, with a change data value flow step that uses the append data process (outlined here: Append Data to a Field - Marketo Docs - Product Docs​) to add that new comment to either the beginning or end of the historical comments field. You could also add a datetime token in there to timestamp each comment.

Hope that helps!

Jaime_Servaes
Level 3

Re: Updating form comment field without overwriting current data

I'm having the same trouble, but I need to ask. How do I add a datetime token or timestamp to just the comment field? The issue I have is that when my email alert are sent to the sale people, they are seeing old comments b/c the data is sitting in that field.  So I'd like to either show them the date the comment was made or move it into this comment history field you are talking about. But having the datetime would be nice in the comment history. TIA

SanfordWhiteman
Level 10 - Community Moderator

Re: Updating form comment field without overwriting current data

{{system.datetime}}

Dan_Stevens_
Level 10 - Champion Alumni

Re: Updating form comment field without overwriting current data

Initially capture the data into a proxy/temp comment field.  Then create a CDV flow step with a choice:

If "main-comment" field is empty,

- "main-comment" = {{system.datetime}}: {{lead.temp-comment}}

else,

- "main-comment" = {{system.datetime}}: {{lead.temp-comment}}, {{lead.main-comment}}

Dan_Stevens_
Level 10 - Champion Alumni

Re: Updating form comment field without overwriting current data

sorry, it appears that you received three like responses at the same time.  All have the same approach in mind.