AJO Helper Functions | Community
Skip to main content
Level 4
March 19, 2024
Solved

AJO Helper Functions

  • March 19, 2024
  • 3 replies
  • 1463 views

HI ALL  @satheeskannak  @mohan_dugganab @arpan-garg @anuhya-y @akshaaga 
We are trying to use the event attribute with the help of contextual attribute in the below IF ELSE condition in expression fragment  and this "1141761358" is not letting us to validate the expression Can you let us know is ther is any  walkaround for that or there is any syntictaial error Can you please let us know 


{%#if context.journey.events.1141761358._abc.individualId.equals("hello",false)%}

render_1

{%else%}

{%/if%}


error
Invalid syntax Error in parsing PQL expression "context.journey.events.1141761358._abc.individualId.equals("hello",false)": line 1:22 mismatched input '.1141761358' expecting {<EOF>, '*', '/', '%', '+', '-', '(', '.', '[', '>', '>=', '<', '<=', '!=', '?:', '=', And, Or, Occurs, In, Like, Matches, 'notIn'}. Error beginning at position: Line 2, Character 4

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by d_G_n111

try the below:

{%#if notEqualsIgnoreCase(context.journey.events.`1141761358`._abc.individualId,"hello") %}

render_1

{%else%}

render 2

{%/if%}

3 replies

Mohan_Dugganab
Adobe Employee
Adobe Employee
March 19, 2024

You can use something on the following lines


{%#if equalsIgnoreCase(context.journey.events.`1141761358`._abc.individualId,"hello") %}

render_1

{%else%}

default_content

{%/if%}

Level 4
March 19, 2024

this will check the the if condition is equal to hello then it will pass only 

d_G_n111Accepted solution
Level 2
March 20, 2024

try the below:

{%#if notEqualsIgnoreCase(context.journey.events.`1141761358`._abc.individualId,"hello") %}

render_1

{%else%}

render 2

{%/if%}

Sukrity_Wadhwa
Community Manager
Community Manager
May 27, 2024

Hi @mysteriousman,

Were you able to resolve this query with the help of the given solutions or do you still need more help here? Do let us know. In case the given solutions were helpful, then kindly choose the one that helped you the most as the 'Correct Reply'.
Thanks!

Sukrity Wadhwa