I wish to format a contextual attribute coming from an event in a journey.
I have tried a few variations below for the snippet but none have worked so far.
{%= formatDate(context.journey.events.``1527359670``._tester.modifyDate, "DD MMMM YYYY K:mm a") %}
Invalid syntax Error in parsing PQL expression "formatDate(context.journey.events.``1527359670``._tester.modifyDate, "DD MMMM YYYY K:mm a", "en-NZ")": line 1:34 token recognition error at: '``'. Error beginning at position: Line 1, Character 1
{%= formatDate(context.journey.events.`1527359670`._tester.modifyDate, "DD MMMM YYYY K:mm a") %}
Invalid syntax Usage of function "formatDate" does not match available signatures. Usage: [PQLSchemaImplJson({"meta:xdmType":"string"}), PQLSchemaImplJson({"meta:xdmType":"string"})] Signatures: [(List(PQLSchemaImplJson({"meta:xdmType":"date-time"}), PQLSchemaImplJson({"meta:xdmType":"string"}), PQLSchemaImplJson({"meta:xdmType":"string"})),PQLSchemaImplJson({"meta:xdmType":"string"})), (List(PQLSchemaImplJson({"meta:xdmType":"date-time"}), PQLSchemaImplJson({"meta:xdmType":"string"})),PQLSchemaImplJson({"meta:xdmType":"string"}))]. Error beginning at position: Line 1, Character 1
{%= formatDate(context.journey.events.1527359670._tester.modifyDate, "DD MMMM YYYY K:mm a") %}
Invalid syntax Error in parsing PQL expression "formatDate(context.journey.events.1527359670._tester.modifyDate, "DD MMMM YYYY K:mm a")": line 1:10 mismatched input '(' expecting <EOF>. Error beginning at position: Line 1, Character 1
Any advise or suggestions are appreciated.
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
Your first two examples - the issue is with the quotes around the contextual attributes.
Depending on the format of attribute you are bringing in you might want to try stringToDate as your function. or first convert your value -> toString and then use stringToDate.
Using the let function to rename the attribute may make it easier to work with in later functions.
Your first two examples - the issue is with the quotes around the contextual attributes.
Depending on the format of attribute you are bringing in you might want to try stringToDate as your function. or first convert your value -> toString and then use stringToDate.
Using the let function to rename the attribute may make it easier to work with in later functions.
Hi @campaignap @Ivan_Mironchuk
this solution worked ? IF yes can you share the outcome and some sample values
Views
Replies
Total Likes
Views
Likes
Replies