Hi,
Called from List Page > Page_Render (v2025.5)
if(CurrentMasterTable()->TableName=="MapPoints"){
//CurrentMasterTable()->ID->Visible = false;
//CurrentMasterTable()->MapID->Visible = false;
//CurrentMasterTable()->CategoryID->Visible = false;
//CurrentMasterTable()->SubcategoryID->Visible = false;
//CurrentMasterTable()->Latitude->Visible = false;
//CurrentMasterTable()->Longitude->Visible = false;
//CurrentMasterTable()->UserUUID->Visible = false;
//CurrentMasterTable()->Type->Visible = false;
//CurrentMasterTable()->IconColor->Visible = false;
//CurrentMasterTable()->IconUrl->Visible = false;
//CurrentMasterTable()->Active->Visible = false;
//CurrentMasterTable()->Description->Visible = false;
}
this worked on PHPMaker2023
returns following error on PHPMaker2025.5
Call to undefined function CurrentMasterTable()
ppinto
January 31, 2025, 7:02pm
2
Try:
if($this->getCurrentMasterTable() == "MapPoints"){
1 Like
yaaryvp
January 31, 2025, 10:09pm
3
Thanks,
$this->getCurrentMasterTable()
dumped as string(9) “MapPoints”
Trying to acheive hiding parent fields from display.
CurrentMasterTable()->IconColor->Visible = false;
CurrentMasterTable()->IconUrl->Visible = false;
CurrentMasterTable()->Active->Visible = false;
CurrentMasterTable()->Description->Visible = false;
If master table is MapPoint
and detail table is Images
and each MapPoint can have unlimited images
when i list images via the master table link:
/imageslist?showmaster=MapPoints&fk_ID=3
I want to hide most of the Master table fields using
CurrentMasterTable()->Active->Visible = false;
So I need to do it in MapPoint table but what event do I target?
arbei
February 1, 2025, 10:23am
6
You may get the master table object in the List page of the detail table by Container("MapPoint")
.
yaaryvp
February 3, 2025, 12:04pm
7
Container(‘MapPoints’) returns:
Call to undefined function Container()
arbei
February 3, 2025, 12:53pm
8
Where did you put your code? You cannot use it in Global Code.
detail table Images on list page → page render
arbei
February 4, 2025, 1:29am
10
Then the Container()
function is defined. You may want to delete all scripts and generate again. If error occurs again, you should enable Debug and post the complete error stack trace and post your complete Page_Render server event.