• Mee Sharma
  • NEWBIE
  • 20 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 9
    Replies
I have a requirement where i need to merge all accounts if a particular field vendor_code__c value is duplicate.There is also a condition that the account of record type 'A' needs to be the master and record type 'B' needs to be the dupliacte. I have written  a batch code for this fucntionality.I am not getting any errors but the accounts are not getting merged either. Kindly help!

global class BatchVendorAccountMerge implements database.Batchable<sobject>   {

    global  database.QueryLocator start(Database.BatchableContext ctx){
        string query;
        query = 'SELECT Id, Type, RecordTypeId,Record_Type__c, Name, MasterRecordId, Vendor_Code__c FROM Account';
                   
        return database.getQuerylocator(query);
        
    }
    
    global void execute(Database.BatchableContext BC, list<account> scope ){
        
     //create a map with vendor code and its account        
            
        //to store all unique vendor codes
        Set<string> strVC = new Set<string>();
        
         //create a map with vendor code and its account        
        map<string,list<account>> vendoraccmap = new map<string,list<account>>();
        
        
        for(account a:scope){
            
            strVC.add(a.Vendor_Code__c);
                        
            if(vendoraccmap.containskey(a.Vendor_Code__c)) {
              vendoraccmap.get(a.Vendor_Code__c).add(a);
            } else {
                vendoraccmap.put(a.Vendor_Code__c, new List<account> {a});
           
        } 
        }
       system.debug('****Unique vendor codes***'+strVC);
        system.debug('****vendor and acc map***'+vendoraccmap);
        
       Account masteracc = new account();
        list<account> dupacc = new list<account>();
            
        for(string v:vendoraccmap.keySet()){
            if(vendoraccmap.get(v).size() > 1)               
                
            
                system.debug('**vendoraccmapsize**'+vendoraccmap.get(v).size());
            {  
          
                for(Account a:vendoraccmap.get(v)) 
                {
                    if(a.Record_Type__c == 'A'){
                        masteracc.id=a.id;
                    }
                     else  if (a.Record_Type__c == 'B') {
                        dupacc.add(a);
                    }
                    
                     
                }
                
                system.debug('***Master account***'+masteracc);
                system.debug('***Duplicate accounts***'+dupacc);
            }
        }
        
        
        Database.MergeResult[] results = Database.merge(masteracc, dupacc, false);
      
        
        
     system.debug('***results merged**'+results);
        
       for(Database.MergeResult res : results) {
          if (res.isSuccess()) {
              System.debug('Master record ID: ' + res.getId());
        System.assertEquals(masteracc.Id, res.getId());               
        
      
        List<Id> mergedIds = res.getMergedRecordIds();
        System.debug('IDs of merged records: ' + mergedIds);                
        
                   
    }
    else {
        for(Database.Error err : res.getErrors()) {
            
            System.debug(err.getMessage());
        }
       }
    
     }
    }
    
    
     global void finish(Database.BatchableContext BC){
         
    }

    
    
}
My requirement is that when i check the checkboxes and click on delete button the records need to be deleted.
I am getting the following error while trying to click on delete button(created in parent cmp) which accesses the delete method in its child component.
Please help as I am not able to find out what is wrong..

"This page has an error. You might just need to refresh it. Action failed: c:Budgetdisplay$controller$delparent [chn.deletemethod is not a function] Failing descriptor: {c:Budgetdisplay$controller$delparent}"

Parent component
<aura:component>
<table>
<thead>
<!--data table-columns--->
 <lightning:button label="Delete"                         
                          variant="brand"
                          onclick="{!c.delparent}"/>                         
             
                    </thead> 
    <!-- ITERATION -->
             <tbody>
                      <aura:iteration items="{!v.expense}" var="e" indexVar="sNo">
                       <!-- Child Lightning Component --> 
                    <c:inlineedit aura:id ="inline" singleRec="{!e}"
                                     showSaveCancelBtn="{!v.showSaveCancelBtn}"
                                     sNo="{!sNo + 1}" />
            </aura:iteration>
</tbody>
</table>
</aura:component>

parent controller

delparent : function(component,event,helper){
      var chn = component.find("inline");
        chn.deletemethod();
    }

child component
<aura:component>
 <!--Table Row Start-->  
        <aura:method name="deletemethod" action = "{!c.delete}" access="global"/>       
       <tr class="slds-hint-parent" >
           <td>
           <ui:inputCheckbox aura:id="eachbox" text="{!v.singleRec.Id}" />
           </td>
    <!---other rows--->
         </tr>
</aura:component>

child controller
delete :function(component, event, helper){
    
    var delid = [];
    var getAllId = component.find("eachbox");
    console.log('getallid'+getAllId);
    
    if(! Array.isArray(getAllId)){
         if (getAllId.get("v.value") == true) {
           delid.push(getAllId.get("v.text"));
         }
     }
else{
      for (var i = 0; i < getAllId.length; i++) {
       if (getAllId[i].get("v.value") == true) {
         delid.push(getAllId[i].get("v.text"));
       }
      }
     }      
  
    console.log('testdelid'+delid);
    helper.deleteSelectedHelper(component, event, delid);
      
      },
    
Below is my lightning component that displays a table of expenses__c records based on a filter. I am trying to include an edit button for each row of the table so that when i click on it it redirects to the respective record edit page.

But i am getting the following error--"Action failed: c:Budgetdisplay$controller$edit [Cannot read property 'setParams' of undefined] Failing descriptor: {c:Budgetdisplay$controller$edit}"

Budgetdisplay.cmp
<aura:component implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes" access="global"  controller="budgetlightningcntrl" >
    <aura:attribute name="expense" type="Expenses__c[]"/>
    <aura:attribute name="allExpenses" type="Expenses__c[]" />
         
   <aura:handler event="c:statussearchkey" action="{!c.searchKeyChange}"/>
   <aura:handler name="init" action="{!c.doInit}" value="{!this}"/>

 <!-- PAGE HEADER -->
    
     <table >
               <!--Search component-->
                          
                      <tr>
                         <th scope="col" ><div class=" slds-text-align--left">Edit</div></th>
                        <th scope="col" ><div class=" slds-text-align--left">Expenses ID</div></th>
                        <th scope="col"><div class="slds-truncate  slds-text-align--right">Amount</div></th>
                        <th scope="col"><div class="slds-truncate  slds-text-align--right">Status</div></th>
                        <th scope="col"><div class="slds-truncate slds-text-align--right">My Budget</div></th>
                       </tr>
                    </thead> 
    
             <tbody>
                      <aura:iteration items="{!v.expense}" var="e">
                       <tr class="slds-hint-parent" >
                           <td> 
                               <lightning:button label="Edit Record" onclick="{!c.edit}"/>
    
                           </td>
                              <td scope="row">
                                <div class="slds-truncate slds-text-align--left" >
                                <a target="_blank" href="{!'/'+e.Id}">{!e.Name}</a>                                 
                                </div>
                                </td>
                            <td scope="row">
                            <div class="slds-truncate slds-text-align--right"><ui:outputNumber value="{!e.Amount__c}"/></div>
                            </td>
                            <td scope="row">
                            <div class="slds-truncate slds-text-align--right"><ui:outputText value="{!e.Status__c}" /></div>                            
                            </td>
                            <td>
                            <div class="slds-truncate slds-text-align--right">
                            <button type="button" onclick="{!c.navigate}" id="{!e.Budget__c}">check Budget</button> 
                            </div>
                          </td>
                     </tr>            
            </aura:iteration>
          </tbody>         
       </table>
    </aura:component>

Budgetdisplaycontroller.js
({
    doInit: function(component, event, helper) {

    // Create the action
    var action = component.get("c.getexpense");

    // Add callback behavior for when response is received
    action.setCallback(this, function(response) {
        var state = response.getState();
        if (component.isValid() && state === "SUCCESS") {
            component.set("v.expense", response.getReturnValue());
        }
        else {
            console.log("Failed with state: " + state);
        }
    });

    // Send action off to be executed
    $A.enqueueAction(action);
},
    
    searchKeyChange : function(component, event, helper){
    helper.findByName(component,event); 
}
  , 
     edit : function(component, event, helper) {
    var editRecordEvent  = $A.get("e.force:editRecord");
    editRecordEvent.setParams({

        "recordId" : component.get("v.expense.Id")

    });

    editRecordEvent .fire();

}
,
    navigate: function(component, event, helper) {
  var idx = event.currentTarget.id;
    var naviEvt = $A.get("e.force:navigateToSObject");
        if (naviEvt){
              naviEvt.setParams({
                 "recordId": idx ,
                 "slideDevName": "detail"
                });

                   naviEvt.fire();
                   }
                  else{
                      window.location.href = "/" + idx;
                  }

}
  
    
})

 
I am very new to lightning and have a basic issue with creating a button. My requirement is that when i click on 'check my budget' button it should redirect me to the corresponding budget record of that expense.
Budget-Master object; Expense-detail object

Budgetdisplay.cmp
<aura:component implements="flexipage:availableForAllPageTypes,force:appHostable" controller="budgetlightningcntrl" >
    <aura:attribute name="expense" type="Expenses__c[]"/>
    <aura:attribute name="spinner" type="Boolean" default="false"/>
    <aura:handler event="aura:waiting" action="{!c.showSpinner}"/>    
    <aura:handler event="aura:doneWaiting" action="{!c.hideSpinner}"/>     
  <aura:handler event="force:navigateToSObject" action="{!c.navigate}"/>   
   <aura:handler name="init" action="{!c.doInit}" value="{!this}"/>
    
  <aura:if isTrue="{!v.spinner}">
    <div aura:id="spinnerId" class="slds-spinner_container">
       <div class="slds-spinner--brand  slds-spinner slds-spinner--large slds-is-relative" role="alert">
         <span class="slds-assistive-text">Loading</span>
         <div class="slds-spinner__dot-a"></div>
         <div class="slds-spinner__dot-b"></div>
       </div>
    </div>
 </aura:if>
        
    <table class="slds-p-around_x-small slds-text-body_small slds-table slds-table--bordered slds-table--fixed-layout " >
                <thead>
                    <tr>                        
                        <th scope="col" colspan="3" class="slds-truncate slds-text-align--center slds-text-align--center 
                                                           slds-text-align_right slds-text-heading_medium">My Budget and Expenses</th>
                    </tr>
                    <tr>                        
                        <th scope="col"><div class="slds-truncate ">My Budget</div></th>
                        <th scope="col" ><div class=" slds-text-align--center">Expenses ID</div></th>
                        <th scope="col"><div class="slds-truncate  slds-text-align--right">Amount</div></th>
                        <th scope="col"><div class="slds-truncate  slds-text-align--right">Status</div></th>
                        <th scope="col"><div class="slds-truncate  slds-text-align--right">Mode of Travel</div></th>
                        <th scope="col"><div class="slds-truncate  slds-text-align--right">Date of Expense</div></th>
                    </tr>
                </thead> 
        <tbody>
            <aura:iteration items="{!v.expense}" var="e">
                <tr class="slds-hint-parent" >
                    <td>
                        <button type="button" onclick="{!c.navigate}" id="{!e.Budget__r.Id}">check Budget</button>                      
                            </td>
                            <td scope="row">
                                <div class="slds-truncate slds-text-align--right" >
                                <a target="_blank" href="{!'/'+e.Id}">{!e.Name}</a>                                 
                                </div>
                                </td>
                            <td scope="row">
                                 <div class="slds-truncate slds-text-align--right"><ui:outputNumber value="{!e.Amount__c}"/></div>
                            </td>
                            <td scope="row">
                                <div class="slds-truncate slds-text-align--right"><ui:outputText value="{!e.Status__c}" /></div>                            
                            </td>
                            <td scope="row">
                                <div class="slds-truncate slds-text-align--right"><ui:outputText value="{!e.Mode_of_Travel__c}"/></div>
                            </td>  
                            <td scope="row">
                                <div class="slds-truncate slds-text-align--right"><ui:outputDate value="{!e.Date_of_Expense__c}"/></div>
                            </td>
                        </tr>            
            </aura:iteration>
          </tbody>
       </table>
</aura:component>

Budgetdisplaycontroller.js
({
    doInit: function(component, event, helper) {

    // Create the action
    var action = component.get("c.getexpense");

    // Add callback behavior for when response is received
    action.setCallback(this, function(response) {
        var state = response.getState();
        if (component.isValid() && state === "SUCCESS") {
            component.set("v.expense", response.getReturnValue());
        }
        else {
            console.log("Failed with state: " + state);
        }
    });

    // Send action off to be executed
    $A.enqueueAction(action);
},

    navigate: function(component, event, helper) {
  var idx = event.currentTarget.id;
    var navEvt = $A.get("e.force:navigateToSObject");
    navEvt.setParams({
      "recordId": idx
        });
    navEvt.fire();

}
,
    showSpinner: function(component,event,helper){
        component.set("v.spinner",true);
    },
    
    hideSpinner: function(component,event,helper){
        component.set("v.spinner",false);
    }
    
})
I have a requirement where i need to merge all accounts if a particular field vendor_code__c value is duplicate.There is also a condition that the account of record type 'A' needs to be the master and record type 'B' needs to be the dupliacte. I have written  a batch code for this fucntionality.I am not getting any errors but the accounts are not getting merged either. Kindly help!

global class BatchVendorAccountMerge implements database.Batchable<sobject>   {

    global  database.QueryLocator start(Database.BatchableContext ctx){
        string query;
        query = 'SELECT Id, Type, RecordTypeId,Record_Type__c, Name, MasterRecordId, Vendor_Code__c FROM Account';
                   
        return database.getQuerylocator(query);
        
    }
    
    global void execute(Database.BatchableContext BC, list<account> scope ){
        
     //create a map with vendor code and its account        
            
        //to store all unique vendor codes
        Set<string> strVC = new Set<string>();
        
         //create a map with vendor code and its account        
        map<string,list<account>> vendoraccmap = new map<string,list<account>>();
        
        
        for(account a:scope){
            
            strVC.add(a.Vendor_Code__c);
                        
            if(vendoraccmap.containskey(a.Vendor_Code__c)) {
              vendoraccmap.get(a.Vendor_Code__c).add(a);
            } else {
                vendoraccmap.put(a.Vendor_Code__c, new List<account> {a});
           
        } 
        }
       system.debug('****Unique vendor codes***'+strVC);
        system.debug('****vendor and acc map***'+vendoraccmap);
        
       Account masteracc = new account();
        list<account> dupacc = new list<account>();
            
        for(string v:vendoraccmap.keySet()){
            if(vendoraccmap.get(v).size() > 1)               
                
            
                system.debug('**vendoraccmapsize**'+vendoraccmap.get(v).size());
            {  
          
                for(Account a:vendoraccmap.get(v)) 
                {
                    if(a.Record_Type__c == 'A'){
                        masteracc.id=a.id;
                    }
                     else  if (a.Record_Type__c == 'B') {
                        dupacc.add(a);
                    }
                    
                     
                }
                
                system.debug('***Master account***'+masteracc);
                system.debug('***Duplicate accounts***'+dupacc);
            }
        }
        
        
        Database.MergeResult[] results = Database.merge(masteracc, dupacc, false);
      
        
        
     system.debug('***results merged**'+results);
        
       for(Database.MergeResult res : results) {
          if (res.isSuccess()) {
              System.debug('Master record ID: ' + res.getId());
        System.assertEquals(masteracc.Id, res.getId());               
        
      
        List<Id> mergedIds = res.getMergedRecordIds();
        System.debug('IDs of merged records: ' + mergedIds);                
        
                   
    }
    else {
        for(Database.Error err : res.getErrors()) {
            
            System.debug(err.getMessage());
        }
       }
    
     }
    }
    
    
     global void finish(Database.BatchableContext BC){
         
    }

    
    
}
My requirement is that when i check the checkboxes and click on delete button the records need to be deleted.
I am getting the following error while trying to click on delete button(created in parent cmp) which accesses the delete method in its child component.
Please help as I am not able to find out what is wrong..

"This page has an error. You might just need to refresh it. Action failed: c:Budgetdisplay$controller$delparent [chn.deletemethod is not a function] Failing descriptor: {c:Budgetdisplay$controller$delparent}"

Parent component
<aura:component>
<table>
<thead>
<!--data table-columns--->
 <lightning:button label="Delete"                         
                          variant="brand"
                          onclick="{!c.delparent}"/>                         
             
                    </thead> 
    <!-- ITERATION -->
             <tbody>
                      <aura:iteration items="{!v.expense}" var="e" indexVar="sNo">
                       <!-- Child Lightning Component --> 
                    <c:inlineedit aura:id ="inline" singleRec="{!e}"
                                     showSaveCancelBtn="{!v.showSaveCancelBtn}"
                                     sNo="{!sNo + 1}" />
            </aura:iteration>
</tbody>
</table>
</aura:component>

parent controller

delparent : function(component,event,helper){
      var chn = component.find("inline");
        chn.deletemethod();
    }

child component
<aura:component>
 <!--Table Row Start-->  
        <aura:method name="deletemethod" action = "{!c.delete}" access="global"/>       
       <tr class="slds-hint-parent" >
           <td>
           <ui:inputCheckbox aura:id="eachbox" text="{!v.singleRec.Id}" />
           </td>
    <!---other rows--->
         </tr>
</aura:component>

child controller
delete :function(component, event, helper){
    
    var delid = [];
    var getAllId = component.find("eachbox");
    console.log('getallid'+getAllId);
    
    if(! Array.isArray(getAllId)){
         if (getAllId.get("v.value") == true) {
           delid.push(getAllId.get("v.text"));
         }
     }
else{
      for (var i = 0; i < getAllId.length; i++) {
       if (getAllId[i].get("v.value") == true) {
         delid.push(getAllId[i].get("v.text"));
       }
      }
     }      
  
    console.log('testdelid'+delid);
    helper.deleteSelectedHelper(component, event, delid);
      
      },
    
Below is my lightning component that displays a table of expenses__c records based on a filter. I am trying to include an edit button for each row of the table so that when i click on it it redirects to the respective record edit page.

But i am getting the following error--"Action failed: c:Budgetdisplay$controller$edit [Cannot read property 'setParams' of undefined] Failing descriptor: {c:Budgetdisplay$controller$edit}"

Budgetdisplay.cmp
<aura:component implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes" access="global"  controller="budgetlightningcntrl" >
    <aura:attribute name="expense" type="Expenses__c[]"/>
    <aura:attribute name="allExpenses" type="Expenses__c[]" />
         
   <aura:handler event="c:statussearchkey" action="{!c.searchKeyChange}"/>
   <aura:handler name="init" action="{!c.doInit}" value="{!this}"/>

 <!-- PAGE HEADER -->
    
     <table >
               <!--Search component-->
                          
                      <tr>
                         <th scope="col" ><div class=" slds-text-align--left">Edit</div></th>
                        <th scope="col" ><div class=" slds-text-align--left">Expenses ID</div></th>
                        <th scope="col"><div class="slds-truncate  slds-text-align--right">Amount</div></th>
                        <th scope="col"><div class="slds-truncate  slds-text-align--right">Status</div></th>
                        <th scope="col"><div class="slds-truncate slds-text-align--right">My Budget</div></th>
                       </tr>
                    </thead> 
    
             <tbody>
                      <aura:iteration items="{!v.expense}" var="e">
                       <tr class="slds-hint-parent" >
                           <td> 
                               <lightning:button label="Edit Record" onclick="{!c.edit}"/>
    
                           </td>
                              <td scope="row">
                                <div class="slds-truncate slds-text-align--left" >
                                <a target="_blank" href="{!'/'+e.Id}">{!e.Name}</a>                                 
                                </div>
                                </td>
                            <td scope="row">
                            <div class="slds-truncate slds-text-align--right"><ui:outputNumber value="{!e.Amount__c}"/></div>
                            </td>
                            <td scope="row">
                            <div class="slds-truncate slds-text-align--right"><ui:outputText value="{!e.Status__c}" /></div>                            
                            </td>
                            <td>
                            <div class="slds-truncate slds-text-align--right">
                            <button type="button" onclick="{!c.navigate}" id="{!e.Budget__c}">check Budget</button> 
                            </div>
                          </td>
                     </tr>            
            </aura:iteration>
          </tbody>         
       </table>
    </aura:component>

Budgetdisplaycontroller.js
({
    doInit: function(component, event, helper) {

    // Create the action
    var action = component.get("c.getexpense");

    // Add callback behavior for when response is received
    action.setCallback(this, function(response) {
        var state = response.getState();
        if (component.isValid() && state === "SUCCESS") {
            component.set("v.expense", response.getReturnValue());
        }
        else {
            console.log("Failed with state: " + state);
        }
    });

    // Send action off to be executed
    $A.enqueueAction(action);
},
    
    searchKeyChange : function(component, event, helper){
    helper.findByName(component,event); 
}
  , 
     edit : function(component, event, helper) {
    var editRecordEvent  = $A.get("e.force:editRecord");
    editRecordEvent.setParams({

        "recordId" : component.get("v.expense.Id")

    });

    editRecordEvent .fire();

}
,
    navigate: function(component, event, helper) {
  var idx = event.currentTarget.id;
    var naviEvt = $A.get("e.force:navigateToSObject");
        if (naviEvt){
              naviEvt.setParams({
                 "recordId": idx ,
                 "slideDevName": "detail"
                });

                   naviEvt.fire();
                   }
                  else{
                      window.location.href = "/" + idx;
                  }

}
  
    
})

 
I am very new to lightning and have a basic issue with creating a button. My requirement is that when i click on 'check my budget' button it should redirect me to the corresponding budget record of that expense.
Budget-Master object; Expense-detail object

Budgetdisplay.cmp
<aura:component implements="flexipage:availableForAllPageTypes,force:appHostable" controller="budgetlightningcntrl" >
    <aura:attribute name="expense" type="Expenses__c[]"/>
    <aura:attribute name="spinner" type="Boolean" default="false"/>
    <aura:handler event="aura:waiting" action="{!c.showSpinner}"/>    
    <aura:handler event="aura:doneWaiting" action="{!c.hideSpinner}"/>     
  <aura:handler event="force:navigateToSObject" action="{!c.navigate}"/>   
   <aura:handler name="init" action="{!c.doInit}" value="{!this}"/>
    
  <aura:if isTrue="{!v.spinner}">
    <div aura:id="spinnerId" class="slds-spinner_container">
       <div class="slds-spinner--brand  slds-spinner slds-spinner--large slds-is-relative" role="alert">
         <span class="slds-assistive-text">Loading</span>
         <div class="slds-spinner__dot-a"></div>
         <div class="slds-spinner__dot-b"></div>
       </div>
    </div>
 </aura:if>
        
    <table class="slds-p-around_x-small slds-text-body_small slds-table slds-table--bordered slds-table--fixed-layout " >
                <thead>
                    <tr>                        
                        <th scope="col" colspan="3" class="slds-truncate slds-text-align--center slds-text-align--center 
                                                           slds-text-align_right slds-text-heading_medium">My Budget and Expenses</th>
                    </tr>
                    <tr>                        
                        <th scope="col"><div class="slds-truncate ">My Budget</div></th>
                        <th scope="col" ><div class=" slds-text-align--center">Expenses ID</div></th>
                        <th scope="col"><div class="slds-truncate  slds-text-align--right">Amount</div></th>
                        <th scope="col"><div class="slds-truncate  slds-text-align--right">Status</div></th>
                        <th scope="col"><div class="slds-truncate  slds-text-align--right">Mode of Travel</div></th>
                        <th scope="col"><div class="slds-truncate  slds-text-align--right">Date of Expense</div></th>
                    </tr>
                </thead> 
        <tbody>
            <aura:iteration items="{!v.expense}" var="e">
                <tr class="slds-hint-parent" >
                    <td>
                        <button type="button" onclick="{!c.navigate}" id="{!e.Budget__r.Id}">check Budget</button>                      
                            </td>
                            <td scope="row">
                                <div class="slds-truncate slds-text-align--right" >
                                <a target="_blank" href="{!'/'+e.Id}">{!e.Name}</a>                                 
                                </div>
                                </td>
                            <td scope="row">
                                 <div class="slds-truncate slds-text-align--right"><ui:outputNumber value="{!e.Amount__c}"/></div>
                            </td>
                            <td scope="row">
                                <div class="slds-truncate slds-text-align--right"><ui:outputText value="{!e.Status__c}" /></div>                            
                            </td>
                            <td scope="row">
                                <div class="slds-truncate slds-text-align--right"><ui:outputText value="{!e.Mode_of_Travel__c}"/></div>
                            </td>  
                            <td scope="row">
                                <div class="slds-truncate slds-text-align--right"><ui:outputDate value="{!e.Date_of_Expense__c}"/></div>
                            </td>
                        </tr>            
            </aura:iteration>
          </tbody>
       </table>
</aura:component>

Budgetdisplaycontroller.js
({
    doInit: function(component, event, helper) {

    // Create the action
    var action = component.get("c.getexpense");

    // Add callback behavior for when response is received
    action.setCallback(this, function(response) {
        var state = response.getState();
        if (component.isValid() && state === "SUCCESS") {
            component.set("v.expense", response.getReturnValue());
        }
        else {
            console.log("Failed with state: " + state);
        }
    });

    // Send action off to be executed
    $A.enqueueAction(action);
},

    navigate: function(component, event, helper) {
  var idx = event.currentTarget.id;
    var navEvt = $A.get("e.force:navigateToSObject");
    navEvt.setParams({
      "recordId": idx
        });
    navEvt.fire();

}
,
    showSpinner: function(component,event,helper){
        component.set("v.spinner",true);
    },
    
    hideSpinner: function(component,event,helper){
        component.set("v.spinner",false);
    }
    
})
This forum is my last resort before reaching out to our Dev partner, hoping someone can help me figure this out as SFDC support has been a nightmare so far.

What I have:
Right now I have a Flow built that works off of checkboxes on the opportunity and also fields in a custom setting. What it does is say there are 5 checkboxes that relate to legal language. The rep checks off which lines of language they need inserted in the contract and when they click save it takes the 1-5 lines they selected and add it to one text area field called "special Notes". To get thos to work I built a flow that uses the ADD function in an assignment element (Not Equals). It works great except it takes all the spaces out and shows as one chunk of text. I'd love for it to add each line on it's own line. NOTE: I can't use concatenate or Equals because it can be any combination of language so it might be one line on this contract and 3 on the next and 4 on the next and so on.

What I tried already:
I tried adding every line break code I could come across, HTML and formulas code ( BR() ) without any success. I also read a post on this forum about how to use a text template but that only works for concatenate scenarios. I also tried to add a blank variable with just a space in it and that didn't work either, it removed the space.

I think the issue is the custom setting as I don't think that respects formula codes or HTML, but the SFDC rep said that flows do support HTML.

Any help would be greatly appreciated. I'm down to try things out too, don't hesitate to throw out any unproven ideas.

Thanks for your thought and future responses
I have a text formula to which I would like to add a carriage return/line break.  I tried concatenating chr(13) and chr(10), but the validation didn't like it.  Is this possible?