Page 1 of 1

Control which fields in master table to be shown

Posted: Wed Sep 04, 2024 2:41 pm
by yaaryvp

Hello,

I have the following URL

..../screenshotslist?showmaster=Files&fk_fileUUID=aef395c5-638c-11ef-8532-0050563d2c56

As screenshots are connected to files, Files is the master and All of the fields of parent Table appear first and then the records from table Screenshots.
My question is, can I control which fields in master are actually shown without hiding them with jquery after project has loaded

Thank You


Re: table view

Posted: Thu Sep 05, 2024 4:17 am
by sangnandar

Try below code in detail-table

    // Page Render event
    public function pageRender()
    {
        //Log("Page Render");
        CurrentMasterTable()->[master field to be hidden]->Visible = false;
    }

Re: Control which fields in master table to be shown

Posted: Thu Sep 05, 2024 3:03 pm
by yaaryvp

When I try from slave table listview

  // Page Render event
    public function page_Render()
    {
        //Log("Page Render");

        var_dump(CurrentMasterTable());
    }

i get the following error:
Warning: Undefined global variable $Files in /var/www/code-market.net/public_html/src/phpfn.php on line 905

Files BTW is the master table


Re: Control which fields in master table to be shown

Posted: Thu Sep 05, 2024 7:51 pm
by sangnandar

var_dump(CurrentMasterTable()); should return the object.
Try with another master-detail table, see if the problem persists.

It would also helpful for the discussion if you can post tables structure and fk relation.