Highlighted
Respected Contributor.. Respected Contributor..
Respected Contributor..
234 views

(SM) Support Tip: How to restrict visibility of certain fields using custom capability words

(SM) Support Tip: How to restrict visibility of certain fields using custom capability words

Every SM user can query against a file, at times there is requirement where SM operators does not have to see certain fields in the records. One way of achieving this is via custom capability word and format control to pre-set a field value.

The below example prevents users from seeing phone number field in the vendor record, except those operators who has the custom capability word. The format control will initializes the configuration and will set the custom field to value.

For simplicity this example uses the vendor file and restricts access to field phone number. (It can be any field in any record)

Steps:

  1. Create a custom capability word : “restrict.field.visibility” (can be anything)
  2. Edit the vendor format making the field read only
  3. Modify the vendor format control record as below:

Name: Vendor

Under Calculations:

Display : true

Calculation: if (index("restrict.field.visibility", $lo.ucapex)=0) then ($var.field=false) else ($var.field =true)

  1. Modify the Vendor form record as below:

Form : vendor.g

Object type: Text

Property : Value

Input: contract.phone

Visible condition: [$var.field]

 

$var.field = user defined variable

$lo.capex = Array variable holding the operators capability word

index() = It returns the position of the first argument passed.

  1. Set the custom capability word in the operator record which
  2. Test it by logging in with an ordinary user account with and without the new capability word.
Labels (1)
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.