Open View Page with another field not Primary Key

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

Open View Page with another field not Primary Key

Post by wungaz »

I want to open the view page using another unique field not record ID. Originally the View page uses "pagesview.php?showdetail=&ID=1852" but want to use "pagesview.php?showdetail=&Another_ID=my-unique-id" where Another_ID is not a primary key but unique.


arbei
User
Posts: 9288

Post by arbei »

You can update the $filter in Row_Selecting Server Event with your own filter.

For example:
$filter = "Another_ID = " . $_GET("Another_ID");

Read help file topic: "Server Events and Client Scripts" -> "Row_Selecting" Server Event.

You can make sure the page is in View page by checking the CurrentPageID().

Read help file topic: "Server Events and Client Scripts" -> "Some Global Functions" for more information.


Post Reply