Re: Restricted Fields in Forms 3.0
Date: Thu, 26 May 1994 09:02:38 GMT
Message-ID: <CqEJsE.A24_at_uk.ac.brookes>
Dwayne K. Lanclos (lanclosd_at_bcstec.ca.boeing.com) wrote:
> We've got a case here where we want to restrict certain fields on a form
> to be updateable by only two special (administrative) users. All the other
> fields in the table can be changed by regular users. The DBA restricted
> these fields in the Oracle database, but then the regular users couldn't
> update the form.
> We also tried changing the field attributes to "not updateable"
> on-the-fly, but that didn't seem to work, either. We don't want to
> create a special form just for the two administrative users. What
> should we do?
My normal method is to have a pre-record trigger of:
IF condition THEN
set_field('field_name', ENTERABLE, ATTR_ON);
set_field('field_name', UPDATEABLE, ATTR_ON);
ELSE
set_field('field_name', UPDATEABLE, ATTR_OFF);
set_field('field_name', ENTERABLE, ATTR_OFF);
END IF;
I do it like this, since I frequently end up with some fields enterable
dependant on other fields in the same record. If you want to set fields
depending on the user, then a pre-form trigger might work, but it might
only affect the first record (I've not tried it).
Note that setting a field ENTERABLE on a new record removes the ability to actually alter the data in it, hence the use of UPDATEABLE above. If the field is not supposed to be updateable on existing records, then add a check on system.record_status.
-- _________________________ ______________________________________ / Tommy Wareing \ / And I dream about movies \ | p0070621_at_brookes.ac.uk X They won't make of me when I'm dead | \ 0865-483389 / \ - Jon Bon Jovi, Keep the Faith / ~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Received on Thu May 26 1994 - 11:02:38 CEST