cancel
Showing results for 
Search instead for 
Did you mean: 

Join Table (Ui Component) not working

Join Table (Ui Component) not working

I have added a column "frontend_label" in Collection.php:

protected function _initSelect()
{
    parent::_initSelect();

   $this->getSelect()->joinLeft(
        ['secondTable' => $this->getTable('eav_attribute')],
        'main_table.attribute_id = secondTable.attribute_id',
        ['frontend_label']
    );

}

In the form grid I have added a column:

<column name="frontend_label">
    <settings>
        <filter>text</filter>
        <label translate="true">Attribute</label>
    </settings>
</column>

but it's not displaying the value from join table.

Do you have any suggestions?

1 REPLY 1

Re: Join Table (Ui Component) not working

Hi, you solved the problem, I would like to know how