How to add multiple OR/AND condition in the Html in AJO | Community
Skip to main content
Level 2
October 8, 2024
Solved

How to add multiple OR/AND condition in the Html in AJO

  • October 8, 2024
  • 2 replies
  • 591 views

I want to add multiple OR condition in a single city attribute/data.

 

{%#if Country = "INDIA" and City = "ABC" or "DEF" or "GHI" %}

 

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 Mohan_Dugganab

It will be on the following lines 

{%#if profile.homeAddress.countryCode = "FR" and ( profile.homeAddress.city = "ABC" or profile.homeAddress.city = "XYZ" ) %} <a href="https://www.somedomain.com/fr">Consultez notre catalogue</a> {%else%} <a href="https://www.somedomain.com/en">Checkout our catalogue</a> {%/if%}

Reference - https://experienceleague.adobe.com/en/docs/journey-optimizer/using/content-management/personalization/functions/helpers#if-function 

2 replies

Mohan_Dugganab
Adobe Employee
Mohan_DugganabAdobe EmployeeAccepted solution
Adobe Employee
October 8, 2024

It will be on the following lines 

{%#if profile.homeAddress.countryCode = "FR" and ( profile.homeAddress.city = "ABC" or profile.homeAddress.city = "XYZ" ) %} <a href="https://www.somedomain.com/fr">Consultez notre catalogue</a> {%else%} <a href="https://www.somedomain.com/en">Checkout our catalogue</a> {%/if%}

Reference - https://experienceleague.adobe.com/en/docs/journey-optimizer/using/content-management/personalization/functions/helpers#if-function 

DavidKangni
Community Advisor
Community Advisor
October 8, 2024

@niteshsingh 

Try {%#if Country = "INDIA" and (City = "ABC" or City = "DEF" or City = "GHI") %}

David Kangni