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
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

How to store the transaction date of each customer into a variable like array

sakthikumar_gur
Level 2
Level 2

Hi,

I want to store the transaction date by converting into string format(dd-mon-yyyy) and that should stored in a variable for some personalization. Actually I am able to convert the transaction date into string format , But the problem is transaction date is differ for each customers.

Previously I had done with following method using java script activity

1. Created one attribute in schema

2. Converted the transaction date into string format

3. Using xtk.session.Write method() stored the string_format of transaction date.

But is there any possibility to store all transaction date under single variable and the same should be used for personalization.

1 Accepted Solution
Vapsy
Correct answer by
Employee
Employee

Hi Sakthikumar,

I'm not able to catch the complete context of your requirement, but you can try one of the following:

  1. Use <compute-string> inside schema to generate a computed column in the desired string format.
  2. On the fly, inside your workflow you can use the available SQL function to convert them to desired format.
  3. Inside delivery, make use of JS code to convert them in desired formation using formatDate() function and use for personalization.

Hope it helps.

Regards,

Vipul

View solution in original post

0 Replies
Vapsy
Correct answer by
Employee
Employee

Hi Sakthikumar,

I'm not able to catch the complete context of your requirement, but you can try one of the following:

  1. Use <compute-string> inside schema to generate a computed column in the desired string format.
  2. On the fly, inside your workflow you can use the available SQL function to convert them to desired format.
  3. Inside delivery, make use of JS code to convert them in desired formation using formatDate() function and use for personalization.

Hope it helps.

Regards,

Vipul

View solution in original post