Control which fields in master table to be shown

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
yaaryvp
User
Posts: 14

Control which fields in master table to be shown

Post 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


sangnandar
User
Posts: 1031

Post 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;
    }

yaaryvp
User
Posts: 14

Post 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


sangnandar
User
Posts: 1031

Post 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.


Post Reply