0

Here I'm trying to check the multiple conditions inside aura:if. But this is not working. Can anyone help me what is the issue?

Here **DiffValues** is the attribute of type Integer. Even I tried with String also, but didn't work.

<aura:if isTrue="{!and(equals(v.DiffValues,0), lessthanorequal(v.DiffValues,4))}">
                            <div class="slds-grid">
                                <div class="slds-col slds-p-around_medium" style="width: 56%">
                                  <b>  <label for="Charge_Name"> Please select value </label> </b>
                                    <lightning:inputField aura:id="Acc_Name" fieldName="Name" onchange= "{!c.setAccountValue}" variant="label-hidden"/>
                                </div>
                                <div class="slds-col slds-p-around_medium">
                                    
                                </div>
                            </div>
                        </aura:if>
1
  • What exactly are you trying to achieve? Please edit the question to explain the requirement.
    – Phil W
    Jul 1, 2022 at 15:44

1 Answer 1

2

You're confusing AND for OR, and also your conditions would need to be inverted. I presume you want a value of 1-4 being valid, anything else not valid. To get there:

<aura:if isTrue="{!or(lessthanorequal(v.DiffValues,0),greaterthan(v.DiffValues,4))}">

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .