You need to sign in to do that
Don't have an account?

how to limit or control number of records in aura iteration?
I have a lightning component with aura iteration. i want to dspaly only up to 5 records in the boxes.
variable 'FslFromBox' is having around 70 records here. and i am displaying this in one single div box. In this box, i want only 5 records to be shown. rest of the records(after 5 iterations) should not be shown on the box.
how to achieve this?
Code is below.
variable 'FslFromBox' is having around 70 records here. and i am displaying this in one single div box. In this box, i want only 5 records to be shown. rest of the records(after 5 iterations) should not be shown on the box.
how to achieve this?
Code is below.
<aura:attribute name="FslFromBox" type="list"/> <div style="background-color:#1589ee" class="slds-col slds-size_3-of-12 fslContainer"> <div class="userName"> <aura:iteration items="{!v.FslFromBox}" var="FslFromBox" indexVar="int"> <aura:if isTrue="{!and((FslFromBox.ASQ_12MM__c ge 30),(FslFromBox.ASQ_Close_Rate__c ge 0),(FslFromBox.ASQ_Close_Rate__c lt 10))}"> <div class="demo-only"> <span> <lightning:formattedText value="{!FslFromBox.User__r.Name}"/></span> </div> </aura:if> </aura:iteration> </div> </div>
https://developer.salesforce.com/docs/component-library/bundle/aura:iteration/specification
All Answers
https://developer.salesforce.com/docs/component-library/bundle/aura:iteration/specification
Thanks its working. Only the change I made is put the numbers in string. start="1" end = "4"
@dandamudi,
This code dint work :(