Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

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

jasonw30638826
Level 4
Level 4

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

1 Accepted Solution
Vapsy
Correct answer by
Employee
Employee

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

View solution in original post

2 Replies
Vapsy
Correct answer by
Employee
Employee

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

View solution in original post