is there a modification for making it so that there's a checkbox when people add/modify records and that if it's unchecked, the record isn't shown in a search?
Aug 2, 1999, 9:14 PM
Veteran / Moderator (8669 posts)
Aug 2, 1999, 9:14 PM
Post #2 of 2
Views: 250
You could add a checkbox field to your database. I'll call it "ShowRecord" for illustrative purposes. You can call it anything you'd like, as long as you're consistent.
Define the checkbox as
%db_checkbox_fields = ( ShowRecord => 'Yes' );
In db.cgi, sub view_records, at the beginning of the subroutine, add
$in{'ShowRecord'} = "Yes";
}
This will let those with admin permission to view all records, but those without will only be able to view the ones that have the box checked. This will also apply to the owner of the record. The owner will be able to see his own record if he does a "modify" or "delete" though.
------------------
JPD
Define the checkbox as
%db_checkbox_fields = ( ShowRecord => 'Yes' );
In db.cgi, sub view_records, at the beginning of the subroutine, add
Code:
unless ($per_admin) { $in{'ShowRecord'} = "Yes";
}
This will let those with admin permission to view all records, but those without will only be able to view the ones that have the box checked. This will also apply to the owner of the record. The owner will be able to see his own record if he does a "modify" or "delete" though.
------------------
JPD

