Can nay one tell me how can i set user permissions on form level to control user i.e i want to allow user1 only add permission and uer2 should have both add and edit permission how to do it on form level.

Thanks in advance.

6 Years
Discussion Span
Last Post by hfx642

Set the Update property on your blocks, based on the user, in the When-New-Form-Instance trigger.
Of course, the decision as to what privileges to give which user should be based on a table (so the functionality would be table driven).

Edited by hfx642: n/a


say your form in menu is

|____new Master

Here your menu newmaster will open a form for example,
We assue that name of ENTRY menu item is, ENT
AND name of new master menu item is NEWMST
so collectiveley we can say that new master menu item is ENT.NEWMST

Now we will have 4 table for example

usergroup (groupid, groupname,view, add , delete, edit, print) //here last 4 columns would be Y/N kind of columns
users (userid, groupid)
menu_master(menuid, menuname)
group_rights (menuid, groupid)

creat view which joins all above tables, to simply fetch information

You must track logged in userid,

Now in new form instance trigger, you may query your menuid and userid, to find add, delete, edit, print view flags)
or you may create database function with(menuid, userid, operation) which will return whether use has right of that operation or not.


Ok let me play around the permission if i would any problem i will post here any way thanks for suggestion.


Insert this user in database, you may insert more other to test

Insert into USERS (USERNAME,PASSWORD,READ,WRITE,REMOVE,ISADMIN) values ('naveed','naveed',1,1,0,0);

NOw in attached complaint form. I have written code in four triggers
form-new instance
block-pre insert
block-pre update
block-pre delete

Edited by urtrivedi: n/a


It is giving message globel variable does not exists.

Can you make it in this way that user login t through login form and then it should check the user permission and then accordingly it should enable or disable the save,edit,search buttons. you can email me at mrakhter_786@yahoo.com

Thanks for your great help.


When the user goes to user your first (Main Menu) form,
Oracle will automatically generate (present) a login dialog box.
There is no need for you to create one.
To get who the user is, use the "system variable" USER.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.