As of May 31, 2023, we have updated our Code of Conduct.

Questions tagged [aura-iteration]

questions regarding the aura:iteration component. This coomponent iterates over a collection of items and renders the body of the tag for each item.

42 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
3 votes
2 answers
4k views

How do I get the value of a row of HTML table in an aura iteration with onclick?

I am trying to make a functionality where my lightning component shows a table of records and I want to make it so if you click a records row, it autofills my form with that records information. Here ...
Alexander Atkinsoon's user avatar
3 votes
0 answers
844 views

Lightning "change" event doesn't fire in aura:Iteration

I am passing an Object to my component and iterate through it's child records. To handle changes I added the Lightning change handler. (I made data an array, so I can set a default for demo purposes, ...
itsmebasti's user avatar
  • 6,280
2 votes
0 answers
165 views

Route User to Newly Created Record from Flow

so using the Override Finish Behavior feature https://help.salesforce.com/s/articleView?id=sf.flow_concepts_finish_override.htm&type=5 I am having issues routing the user to the newly created ...
andrew's user avatar
  • 141
2 votes
1 answer
1k views

<force:recordData> not getting called

I'm facing trouble with <force:recordData>. I have a list of custom objects displayed in the form of table over <Aura:iteration> Out of that list, when a button is clicked, a certain ...
AjaySFDC's user avatar
  • 555
1 vote
1 answer
3k views

How to navigate to one component to another by passing parameters

I'm new to Salesforce. I have just started with lightning Aura components. I want to understand simple workflow of aura. Can anyone help me with the code for below requirement. Thanks in advance. ...
yakshith bangera's user avatar
1 vote
0 answers
127 views

aura:iteration label of current field

Is there a possibility to get the Label of current field using aura:iteration ? <aura:iteration items="{!v.objectName}" var="objectName"> <lightning:input value="{!objectName.field1}" ...
Quicki's user avatar
  • 115
1 vote
1 answer
2k views

Find value of div inside aura iteration on icon click!

I am trying to find the value of a div which is inside aura iteration on icon click which is also inside the same aura iteration. Here in this code below I am trying to find the value of the aura:id=...
sumchans's user avatar
  • 603
1 vote
0 answers
222 views

create account from a button inside aura iteration and set account id to the adjacent lookup column

I am new to lightning. I am inserting list of contacts in aura iteration with account lookup. I made custom component for searching account, which works fine. But i also need to give option to create ...
Manohar's user avatar
  • 51
1 vote
0 answers
2k 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:...
Carlos Naranjo's user avatar
1 vote
1 answer
255 views

Disable aura:Iteration field but keep name attribute visible

How could it be accomplished to display the field name above the input field if the field is disabled? As of now, if the field is disabled, so is the e.fieldName attribute. <aura:iteration items=...
Jeff's user avatar
  • 191
1 vote
0 answers
2k views

Getting Uncaught Action failed: aura:if$controller$handleTheTruth [Cannot read property '$getType$' of undefined] error on Component.set

In my code, I am getting a list of Object from apex controller, and populating the same into an aura attribute paginationList. On the below line, I am getting the error: component.set('v....
Aakriti's user avatar
  • 11
1 vote
0 answers
133 views

Data binding variables were displayed Blank in Lightning component inside aura:iterator

I'm Displaying two types of lists in Lightning component. One is List of OpportunityTeamMember and other is List of case. But when I'm iterating over List of Opportunity team members I'm able to see ...
user1570555's user avatar
1 vote
1 answer
4k views

Lightning Data Table and Aura Iteration

I am trying to render multiple data tables on a page (inside lightning accordians but thats irrelevent) using Aura iteration. i am specifically having trouble with the data attribute of the datatable. ...
Bobbygllh's user avatar
  • 721
0 votes
0 answers
42 views

Nested aura iterator initializing the same child component twice with different GlobalIds

I have a record listing, created by 3 aura components, that call each other using aura:iteration loops: listCmp: root cmp, represents the list itself recordCmp: represents each record of the list ...
Douglas Molina's user avatar
0 votes
1 answer
492 views

Event.Target.GetAttribute returns null

I'm creating and displaying lightning buttons in aura components dynamically. On click of each button, I'm trying to fetch its index using event.target.getAttribute. I'm able to get it but ...
sfdcdevsathy's user avatar
0 votes
0 answers
41 views

How do I list the names of contacts of an account and navigate to the contact record when one is clicked on

I am trying to list the names of the child contacts of an account with the option to click on one of said contacts names and be redirected to its record page. Everything works except the redirecting ...
RuliaOtter's user avatar
0 votes
0 answers
47 views

From Apex server data is not coming to Aura components

apex wrapper : public with sharing class DemoWrapper { public class Timesheet{ @AuraEnabled public String employeeId {get;set;} @AuraEnabled public String employeeName {get;set;} ...
singh_25's user avatar
0 votes
1 answer
337 views

How to pass lightning:outputField value which is used in recordViewForm

I want to pass my lightning:outputField value to aura controller on hover the field. I'm not able to find a way to do it. Below is the code. <aura:iteration items="{!v.completeList}" var=&...
sfdcOwl's user avatar
  • 35
0 votes
1 answer
430 views

Adding values together in a formattedNumber Aura component

I have two numeric values that I want to add together and be outputted by a lightning:formattedNumber component. I can give pass either value individually to the component and it renders, but not when ...
Matt Smith's user avatar
0 votes
1 answer
2k views

How to set lightning input value using index in aura iteration when button is pressed

I want to set the incremented value to lightning input when a button is pressed. In aura iteration n number of record when I click on a button it is copying the value to all lightning input. But in my ...
Vivek Ah's user avatar
0 votes
0 answers
682 views

Preselect Rows In Lightning Datatable (Aura lightning Component)

I am developing an aura lightning component which is "called" through a visualforce page. The functionality consists of two aura lightning components: Parent aura lightning component: ...
Xrhstos Kolonis's user avatar
0 votes
1 answer
171 views

Display number in table where there are two iterations

I am trying to display numbers in a table where there are two iterations. but if I use indexVar attribute the numbers are not displaying in sequence. Is there any solution to it? Is there any other ...
Cherry Mittal's user avatar
0 votes
0 answers
81 views

Metadata.Layout is NULL in aura component

I have to pull the Metadata.Layout of an object from apex and basically re-create page layouts in aura. My plan was to use the Metadata.Layout and just iterate over the sections/columns/fields. In ...
Arjun Kumar's user avatar
0 votes
0 answers
166 views

Aura:If results in label - field not value

When using aura:if, I can't get the value of the field to show. Unless I'm using lighting:outputfield the result is the field label. Is there something else I should do to ensure the value is produced ...
Harley's user avatar
  • 373
0 votes
1 answer
682 views

Dynamically calculate values in Aura Iteration

I've aura iteration in my Aura Component where I have a start date and End date and I want to calculate the difference between Start and End date for each row in Aura iteration. What options I have ...
sfdc's user avatar
  • 321
0 votes
0 answers
1k views

Iteration in LWC not working for 2nd element of input array

I am working in LWC requirements where I have a list of records using this list I need to create inputs text. Once I loop through the list in LWC 'HTML component' my input texts are coming as aspected ...
SFDC 44's user avatar
  • 664
0 votes
1 answer
267 views

How to change the value of ui:outputText in second div onchange inputfiled in aura iteration in one div

I have below an aura component and a controller function, I want to change the value of ui:outputText on change order Price of lightning:input. Now getting the current input box value in the ...
jsmith's user avatar
  • 145
0 votes
1 answer
374 views

Dynamic expression in nested aura iteration in Salesforce Lightning

I've two objects: listContent: [{'Id':1,'Name':'SF'},{'Id':2,'Name':'DS'}] fields:['Id','Name'] Now I'm using nested aura iteration to display the listContent as shown below: <aura:iteration ...
user76834's user avatar
0 votes
0 answers
912 views

Nested Rows inside table with shared headers - Aura Iteration

I'm trying to create a table with nested rows based on nested array data set with following structure: [ 'key1' : [ 'subKey1' : 'subValue1', 'subKey2' : 'subValue2', ...
nom's user avatar
  • 1
0 votes
0 answers
48 views

<aura if> not working as expected

Hello I made a following component which displays all permission set which i want but now I am stuck. Here I want to display my selected permission set on the table. Although the table is displayed on ...
psalesforce1989's user avatar
0 votes
1 answer
738 views

<aura if is true> not working as expected

I wrote a following code for component but it is not giving result as i expected, Component code <aura:component > <aura:attribute name="parentOptions" type="List"/> <aura:...
psalesforce1989's user avatar
0 votes
1 answer
2k views

Submit Record Edit Form for every object in Aura iteration

I have a Contact object form with a child form component for Buying Center objects. When I upsert the Contact, I need to submit a list of Buying Centers for this Contact. Parent Contact component has ...
UO Man's user avatar
  • 80
0 votes
0 answers
38 views

List item deletion in aura: iteration

I have a list in which every time I click the "Adicionar outro CID" button a new line with a field and a button "Remover" is added just below it: Original image: After clicking the button: If I ...
user69416's user avatar
0 votes
0 answers
132 views

Dynamically change style for iterated list

Wanna add some color gradation(if its possible without js calling) for my iterated elements, but got some trouble with calling index value inside style param. Code look like this: <aura:iteration ...
voidhammer's user avatar
0 votes
0 answers
351 views

Verical tabs - unable to get selected tab dynamically

We have created vertical tabs using lightning:tabset but we could not able to put the icon on the lihgtning:tab . So we are converted lightning:tabs to vertical tabs. But we are not able to capture ...
Roster's user avatar
  • 111
0 votes
0 answers
544 views

Sorting the items in the desired order in lightning component aura:iteration tag

I am displaying list of records using aura:iteration, now i want to put to arrow marks(up and down). if user clicks on any one record want to move that record in the selected direction either up or ...
Ramesh Kopparapu's user avatar
0 votes
1 answer
729 views

Using lightning component inside Aura:Iteration. It doesnt display anything not even any error

Im using lightning component inside Aura:Iteration. It doesnt display anything not even any error. PFB Code <aura:component > <aura:attribute name="item" type="Camping_Item__c" required="...
Priya's user avatar
  • 115
0 votes
1 answer
579 views

Passing iterated variable from Markup to JS Controller

I need a way to keep track of each iterated lightning:inputField so that any changes made to that specific field is reflected by a CSS style change. Markup <aura:iteration items="{!v....
Jeff's user avatar
  • 191
0 votes
0 answers
371 views

Change event on UI:InputText in Aura:Iteration throws 'afterRender threw an error in 'ui:inputText' [(a || s).replace is not a function'

I am facing a very strange error when applying change event on UI:InputText that is inside Aura:Iteration. When I focus out of the Input it throws me below error. This page has an error. You might ...
Shiva Achukatla's user avatar
0 votes
0 answers
147 views

Aura:iteration and appending {!v. } with the var iterator

Is there a way, while iterating through a List of field names to retrieve the corresponding record field value? Ex: <aura:attribute name="layoutAPIFieldsList" type="List" /> <aura:...
Jeff's user avatar
  • 191
0 votes
1 answer
6k views

Multiple input inside aura:iteration table

I have an attribute that I am rendering to a table inside an aura:iteration with the following code: <aura:attribute name="licenceassocparties" type="String[]" default="false" access="PRIVATE"/>...
nom's user avatar
  • 1
-1 votes
1 answer
38 views

I want to iterate over my Account[]

so there is an Account[] which has Accounts and their related contacts. Can i get contacts details like this?: if not then how can i access contacts details, without adding one more aura iteration tag ...
Amar Mishra's user avatar