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

AJO Helper Functions

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.
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%}

4 replies

Sukrity_Wadhwa
Employee
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!

Translate
Sukrity Wadhwa
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%}

Translate
Mohan_Dugganab
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%}

Translate
Level 4
March 19, 2024

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

Translate