Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [iteration]

The tag has no usage guidance.

0
votes
0answers
12 views

Update column value in a table whenever a value in row is changed

I'm populating column values using aura:iteration in a table and i want to change the column values whenever a row's(populated using aura:iteration as well) value input is changed. The problem is that ...
1
vote
2answers
167 views

Exception not being caught; System.FinalException: Cannot modify a collection while it is being iterated

Why is this Exception not being caught? I read that System.LimitException is not caught but didn't see anywhere about System.FinalException. Non-Working Code @AuraEnabled public static List<...
0
votes
0answers
23 views

Incorrect index value being displayed on selection of radio button

I'm iterating over a list using aura:iteration. Each iteration I have a radio button where I have an attribute named data-index="{!index}". In the controller, when I try to print which radio button ...
1
vote
0answers
315 views

Lightning button attribute “Disabled” in “aura:iteration tag”

I'm trying to enable a lightning:button if a lightning:inputField changes. This is the aura:component: <aura:component implements="flexipage:availableForRecordHome,force:hasRecordId,force:...
1
vote
0answers
25 views

how to check iterator in batch process

I am using an iterator to use an aggregate query on a custom object looking for unique years. on the very last iteration, I want to change a value, so I am hoping to use hasNext, but it looks like i ...
1
vote
2answers
129 views

Passing List<WrapperClass> as a parameter from Visualforce to Lightning and to iterate over the List<WrapperClass>

This is my VF code, which runs on onclick <script> function func(data) { $Lightning.use("c:testingFromVFtoLightningApp", function(){ $Lightning.createComponent("c:...
1
vote
1answer
261 views

How to iterate sub query on lightning page

I want to display the contact names and opportunity names where AccountID is not null, I am able to display the contact names, can someone please help me to display the opportunity names too? Below ...
2
votes
1answer
188 views

Iterate related records, display images from string name of contentAsset in Community Cloud

I'm very new to Salesforce, so my apologies if my approach is all wrong. I want to display a list of buttons with images using a lightening component in Community Cloud. The list comes from records ...
1
vote
1answer
18 views

List iteration - item with space

I am trying to create a very basic static list to iterate through. One of the values has a space in it. I can't figure out how to add the item to the list with a space. In the example below, I can'...
0
votes
1answer
22 views

How to make varaible of items in a iteration in a lightning component

I have an iteration which reproduces a list on a lightning page. I want to make this iteration variable based on 2 lists. How do I make the list (items) variable based on IF condition? Or do I need to ...
0
votes
1answer
96 views

iterating a multidimensional List

I am trying to recieve a email with an attachment (CSV FIle) and have it iterate through the csv and upsert it as records in a custom object. i upload the document by hand daily. PAIN! i am using a ...
0
votes
2answers
1k views

how to use wrapper class in batch iterator (using custom iterator)?

So I trying to use list of wrapper class as iterator in batch. below is the code I have tried so far Iterable class public class AccountCustomIterator implements Iterable<AccountWrapper>, ...
2
votes
1answer
4k views

Lightning Components: How to do nested aura:iteration of a list of Accounts with subselected Contacts?

Scenario In Visualforce we had strong patterns for implementing the rendering of hierarchical structures. As a simplified example (standing for many other use cases) let's say we want to show all ...
4
votes
1answer
5k views

Inserting Records using a lightning component

I am looking to make a lightning component to insert my Transaction__c object records against all relevant Contracts pulled back requiring action. As it stands I am returning all of relevant contracts/...
1
vote
2answers
155 views

Add records incrementing based on known Date

I expect this has been described before but have been unable to find it. I am entering OpportunityLineItemSchedule in Apex and would like wipe out the default ones, which are created based on Close ...
4
votes
1answer
781 views

Lightning Aura Iteration ReRender

I am trying to rerender an iteration(wrapper) when an input field is changed although I am extremely unfamiliar with Lightning. Everything that I've read it "it should just work", which I don't ...
0
votes
1answer
221 views

How to pass record id to another component while click on checkbox in aura iteration

I am facing one issue with navigating to record from another component when user selected checkbox in one component and I will get those selected Id in next component.
4
votes
1answer
2k views

How Custom Iterators with Iterable Work

I was reading the topic of using iterator and iterabel Interface - https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_iterable.htm It says : If you do not want ...
0
votes
1answer
833 views

How to display a specific list in a component lightning?

I have a JSON and I parse it. Finally I this is my class for parsing the JSON : public class InterlocuteursParser { public class Interlocuteurs { public String contact; public ...
0
votes
0answers
103 views

Lightning iteration does not accept inputText values

I have the below markup in my Lightning component. <aura:attribute name="items" type="InventoryAdjustWrapper[]" description="Items" access="public" /> <!-- <aura:attribute name="items" ...
3
votes
3answers
2k views

Adding/removing elements from a `Map` while iterating over it

Background I'm working on a bugfix for some code that I've written. The code itself generally works fine (bugfix is for an edge case), and the exact code isn't terribly important for this question. ...
1
vote
0answers
265 views

How do i access components made through iteration without using aura:id?

I am currently developing a search bar for Salesforce Lightning and i am having a bit of trouble with editing the class of dynamically created components using aura:iteration. At the moment i use ...
2
votes
1answer
25 views

How to check values from child object

I was wondering what would be the most efficient way to do the following. The Account object is the parent of the Order object. The Order object has a field called 'Status'. The Status field, a ...
5
votes
2answers
233 views

Looping Through A Map

I have a map I want to loop through and remove all duplicate items. Is there a method that can be used like my pseudo code has? public Map<String, User[]> allPeople { Map<String, User[]&...
0
votes
1answer
33 views

retrieve other fields of a SObject after a user has selected an option

I am writing an app that will help calculate the statute of limitations for certain laws. ex. enter a date that a crime happened on and, after choosing a law and appropriate limitation the limitation ...
4
votes
1answer
500 views

aura:iteration index is empty

I'm trying to conditionally format my items in a Winter'17 Org based on a selected index. But comparing the iteration index to my selected index (v.Active) doesn't work. I tried to output it and it ...
1
vote
0answers
1k views

Using aura:iteration Table Sorting issues [closed]

I'm trying to use Sorting Datatable //cdn.datatables.net/1.10.12/css/jquery.dataTables.css and //cdn.datatables.net/1.10.12/js/jquery.dataTables.js in Salesforce Lightning Component. I've included ...
0
votes
2answers
2k views

Sorting a List<Asset> by a date

I have fetched assets sorted by date using SOQL query. When I do for(Asset a:lstAsset) and add a to a list, the sort order from the SOQL query is lost. I want the sort order to be retained. Is there ...
5
votes
1answer
6k views

How to implement on scroll action in lightning to show next few list of records

I want to render many(about 1000) components and I am displaying them through aura:iteration in another aura:iteration. This is causing me performance issues. I want to display only 10 records at an ...
4
votes
1answer
2k views

Unable to display custom object list attribute returned from client side controller

I am hung up on the hands-on challenge for the Lightning Component Basics > Input Data Using Forms section on Trailhead. I have a form with input controls for name, quantity, price, and isPacked ...
1
vote
1answer
638 views

Aura:Iteration Tag Not Working

I am trying to display information from the users object, but I cannot get the components to cooperate. Code is below: apex: public with sharing class LACC_ObjController { @AuraEnabled public ...
1
vote
2answers
688 views

Aura :iteration and :if, WARNING: Performance degradation..

I'm receiving a WARNING: Performance degradation: Multiple items were set in iteration message. This occurs in the code below when the aura:if element is there, but not when it isn't. Each group ...
0
votes
2answers
67 views

Comparing Two Objects then Modifying a collection 's elements

I am hoping someone can provide some direction. I have reviewed several postings regarding Modifying a Collection of Elements between Two Lists, however, I'm still coming up short on the solution. I ...
3
votes
0answers
1k views

ui:inputCheckbox and aura:iteration: value binding

I am currently writing a lightning component made of a table of elements that can be selected (or not) using a ui:inputCheckbox. So the way I do is fetching the data from APEX controller during the ...
1
vote
0answers
241 views

<aura:handler name=“change”> stops working after being called three times

I'm having an issue with a handler which initially fires as expected for three times, but then stops responding after that. The parent component has three attributes: A list of Custom SObjects A ...
0
votes
1answer
177 views

Daisy Chain Batch Jobs with External Variable

I'm trying to execute the same batch class for a series of dates and I want each batch to process after the previous one has completed. I'm not sure, from an architecture standpoint how to achieve ...
5
votes
1answer
816 views

Lightning Component - data binding not working on sObject [] for new element pushed in array

If I load a sObject array in init function, I m getting my array correctly filled and loaded to the UI using iteration. I create a new button to add (push) new element of the same type to the existing ...
10
votes
2answers
8k views

How to iterate a Map in Aura

I have a aura map attribute defined in my component file as below <aura:attribute name="FilesNameMap" type="Map"> But i am not able to understand how to iterate this in the component file as ...
2
votes
2answers
2k views

Is there a Salesforce solution to Filter or Limit Aura iteration?

I am iterating through a list of items as follows <aura:iteration items="{!v.objWrap}" var="item" indexVar="idx"> ... ... ... </aura:iteration> I also want to have a load more button ...
1
vote
0answers
197 views

Refresh subtab in Service Cloud or page in classical view using Visualforce

I've created a custom Visualforce page which is embedded into quick action (feed view). After user clicks submit button I'm changing the status of a case and trying to refresh the current subtab (...
1
vote
2answers
462 views

Error when aura iteration given list property

I'm getting an error when I supply the list property acc.Contacts to the aura iteration component. <aura:application> <aura:attribute name="acc" type="Account" default="{ ...
1
vote
2answers
927 views

text property of ui:inputSelectOption with aura:iteration not working correctly

My understanding of the text-property from the ui:inputSelectOption is that I can add underlaying data (in difference to the label-property which displays the data on the GUI-Interface). In my opinion ...
0
votes
1answer
2k views

How to fetch the value inside a list item(not having an id since created dynamically) in lightning?

I am creating a a list using aura:iteration: <aura:iteration var="pf" items="{!v.family}" indexVar="ind"> <li class="slds-dropdown__item"> <a href="javascript:void(0);" role="...
2
votes
1answer
451 views

Batch Job with Custom Iterable throwing error First error: Invalid conversion from runtime type CustomIterable to System.Iterable

I get the error First error: Invalid conversion from runtime type CustomIterable to System.Iterable when trying to use a customer iterable in a batch job. My custom iterable class: global class ...
0
votes
3answers
1k views

Modify collection during iteration

I have below code where I need to modify the List during iteration. It throws error. can someone suggest a way out in this case? **Error ** System.FinalException: Cannot modify a collection while it ...
3
votes
2answers
325 views

Pagination Using Iterator Limit

I have to paginate total of 4000-5000 records with 20 records per page. I am using a wrapper class type List. This list would be displayed on a pageblocktable. I CANT use OFFSET because offset has a ...
1
vote
1answer
196 views

<aura:iteration> How to properly add commas on fields

I have an aura iteration using dynamic fields in this code snippet. <aura:iteration items="{!v.qResults}" var="q"> <li id="{!q.Id}" class="slds-dropdown__item" role="menuitem ...
3
votes
1answer
249 views

Using next method in iterator

In my code below: List<Skill__c> skilist = [ select Id,Name from Skill__c where Skill__c.Id IN:sl.keySet()]; Iterator<Skill__c> iter = skilist.iterator(); List<Job_Opening_Skill__c&...
0
votes
1answer
7k views

Copy a list to another list

I have a custom object called skill_Review and I am creating a list in my controller using: List<Skill_Review__c> skillRev = new List<Skill_Review__c> List<Skill_Review__c> ...
2
votes
1answer
124 views

Updates from nested apex repeat in Visualforce not being posted to server correctly

I am having a custom object where there is a list within a list within a list. On the Visualforce page I am presenting it using an apex:repeat and apex:inputText fields. When I try to change and ...