Conditional hide/show Add, Copy Button on specific page

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
danielc
User
Posts: 1601

Re: Conditional hide/show Add, Copy Button on specific page

Post by danielc »

siriok wrote:
$value = ew_ExecuteScalar("SELECT datetm FROM tmhx WHERE pid = ". $rsnew["pid"]);
//datetm -is one field in detail table

There is no $rsnew in list page. You need to add your logic to monitor if user has added on detail record or not. One possible solution is to set session value when user added detail record during Row_Inserting server event. And check this in Page_Render server event in your list page:

if (isset($_SESSION["yourvar"]))
$this->OtherOptions["addedit"]->Items["add"]->Visible = FALSE;

Not sure how long you want to hide the Add button but in this case it is whole session.


mdfaisalpapa
User
Posts: 84

Post by mdfaisalpapa »

How to do this using user id security? I have a master table and a details table. Master table user id is different from the details table user id. I want edit permission only to the user who is having edit permission for master table. The owner of the details table is having other permissions.in short the edit permission of master table to be set to the details table too irrespective of the user id of details table
Kindly help


Post Reply