filePro
Resource Page!

One Line Command for Blocking Update Mode


Sometimes we want to block update mode for some users. A good example is a customer file. Maybe you want some users to check a customer record but you will not allow them to change it. Credit Department Official is the authorized user for this type of transactions. Thats the only user who could update this record.

For this purposes you should do the following. Create two processing tables. One will be the autorized personel processing table (You could create it as an OUTPUT processing table). The other processing table could be created in the default input.prc. You should enter the following code in input.prc to block the update.

@keyU  if:   
     then:   end
   --------------------------------------

Also if you want to block the delete command used the following:

@keyD  if:   
     then:   end
   --------------------------------------

Hint:For feedback purposes add messages and beeps.

The first processing table (the one created as an OUTPUT processing) will have all the validation code for update purposes. Suppose this OUTPUT processing name is INPUT2.PRC. You could use it as an input processing table using the -z switch on the ?clerk line. Suppose the Credit Department Official will use the file for adding a new customer. The line in the filePro menu that invokes this action should be:

/fp/dclerk customer -z input2 -s1
With this type of aproach you dont need to create 2 screens for the users and the official. Remember any time you want to create and block the update just type the above example. The same approach works for any blocking of the default filepro keys.

Direct all questions and doubts to: [email protected]


Last Update:
07/19/2000
Hosted by www.Geocities.ws

1