I would like to combine the Account Name and Industry fields and display the values. Can someone please help?
component.set('v.mycolumns', [
{label: 'Account Name', fieldName: 'Name', type: 'text'},
{label: 'Industry', fieldName: 'Industry', type: 'text'},
{label: 'Phone', fieldName: 'Phone', type: 'Phone'},
{label: 'Website', fieldName: 'Website', type: 'url '}
]);
I have tried {label: 'Account Name', fieldName: 'Name', type: 'text'}
+ {label: 'Account Name', fieldName: 'Name', type: 'text'}
and all sort of combination but nothing seem to work. Can someone help here?
I.e I want to display like Burlington Textile -> Textile
Thanks in advance.
Best Answer
No, you can't create formulas in a data table. You would need to calculate a value based on your criteria, such as:
lightning-datatable
andlightning:datatable
do not otherwise support expressions for fields.