Update/Insert a value to a field when importing a list

Avatar

Avatar

jasonw30638826

Avatar

jasonw30638826

jasonw30638826

18-08-2018

Hi,

I have two questions.

  1. If there any way to update or insert a value to a field when importing a list. The value will look like "ABC_GetDate()", so the final value will be "ABC_8/18/2018".
  2. When deploying a campaign, In the Query window, can I set query to: A field name equal to "ABC_GetDate()" to get the above the record.

Thanks,

Jason

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar

Vapsy

Employee

Avatar

Vapsy

Employee

Vapsy
Employee

19-08-2018

Hi Jason,

Use a JS code activity to create your custom data. Add the following line of code

instance.vars.customData = "ABC_" + formatDate(new Date(), "%2M/%2D/%4Y");

1552225_pastedImage_1.png

Then connect this JS code activity to your query activity or an Enrichment. Add a new column and use the formula

= $(instance/vars/@customoData)

1552232_pastedImage_2.png

When trying to filter thiis data you the condition as

'ABC_' + Month(GetDate()) + "/" + Day(GetDate()) + "/" + Year(GetDate())

1552233_pastedImage_3.png

Regards,
Vipul

Answers (1)

Answers (1)

Avatar

Avatar

jasonw30638826

Avatar

jasonw30638826

jasonw30638826

20-08-2018

Thank you very much Vipul!

Jason