Activity Forums Salesforce® Discussions How to use concatenation for columns of lightning datatable.

  • How to use concatenation for columns of lightning datatable.

    Posted by Yogesh on November 18, 2019 at 8:37 am

    How to use concatenation for columns of lightning datatable.

    Piyush replied 5 years ago 2 Members · 1 Reply
  • 1 Reply
  • Piyush

    Member
    November 18, 2019 at 9:34 am

    Hi,

     public wrapp(Account acct){
            id = acct.Id;
            name = acct.Name + '-'+acct.Master_Customer_ID__c;   
            mdm = acct.Master_Customer_ID__c;     
        }
    concatenateCols() {
        this.columns = [...this.columns, { label: 'fruit-weight', fieldName: 'fruitWeight' }];
        this.data = this.data.map(item => {
            return { ...item, fruitWeight: [[code]]czoxNTI6XCIke2l0ZW0ubmFtZSA/IGl0ZW0ubmFtZSA6ICYjMDM5OyYjMDM5O30keyhpdGVtLm5hbWUgJmFtcDsmYW1wOyBpdGVtLnd7WyYqJl19ZWlnaHQgPyAmIzAzOTsgLSAmIzAzOTsgOiAmIzAzOTsmIzAzOTspfSR7aXRlbS53ZWlnaHQgPyBpdGVtLndlaWdodCA6ICYjMDM5O3tbJiomXX0mIzAzOTt9XCI7e1smKiZdfQ==[[/code]] };
        });
    }

    I think this will help you.

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos