Skip to main content
1 of 3
Phil W
  • 38.1k
  • 5
  • 53
  • 106

Personally I would use the Apex/Java/C++/C style infix OR and AND operators (|| and &&) instead of the or and and functions (the downside being that & is a special character in XML and therefore must be encoded as &).

Try something like:

<aura:if isTrue="{!((v.object.field__c == 'x' &amp;&amp; item.label == 'y') ||
                    (item.label != 'y')) &amp;&amp;
                   ((v.object.field== 'x' &amp;&amp; item.label == 'z') ||
                    (item.label != 'z'))}">
    <option selected = "{!item.selected}" value="{!item.value}">{!item.label}</option>
</aura:if>
Phil W
  • 38.1k
  • 5
  • 53
  • 106