add field security

sdvingo發表於2007-03-25
When you want to add field security you add in the data dictionary two additional lines:

In the FIELD VALIDATION:
{gppswd.v &field = "cm_cr_terms"}

In the FIELD VALIDATION MESSAGE:
ERROR: USER DOES NOT HAVE ACCESS TO THIS FIELD. Please re-enter.


You have now another challange. The customer credit terms already contains another validation:
can-find(ct_mstr where ct_code = cm_cr_terms) or cm_cr_te = ""

cm_cr_te is no TYPING ERROR. It is the shortest unique name for this field!!


You have to add the the password validation as the FIRST validation.

Example.
{gppswd.v &field = "cm_cr_terms"} AND (can-find(ct_mstr where ct_code = cm_cr_terms) or cm_cr_te = "")

For the FIELD VALIDATION MESSAGE:
ERROR: CREDIT TERMS CODE MUST EXIST OR BE BLANK. Please re-enter.
Write some new poetry to help you users.

NEXT STEP:
compile adcsmtb.p. Only then will the field security be activated.

LAST STEP:
Fill the field security in the security menu.

______________________
Request
Lookup the value "gppswd.v" in mfgempty.df and check other existing field checks
______________________

Alternative
For each other field in the future use program mgfldcmt.p. This program first step is to check if the field validation is emtpy or if gpcodsec.v (Generalised Code check) is available. If not it follows the next steps:
- unFreezes the table
- Add the validation and error message
- Freezes the table[@more@]

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/443058/viewspace-906796/,如需轉載,請註明出處,否則將追究法律責任。

相關文章