Registry to Set Required Fields (sys-viewer-afunction)

In version 8.0 and up, the registry entries that allow child table to be defined as required have been enhanced so the all lines are checked for the required field when the record is saved, not just the one the user was ‘on’. In addition, the message alerting the user to an empty required field on a child tab now includes the tab label, such as the following: Required Field: ‘GL Entity Id:’ Not Filled In On Tab ‘RevAdj’

This registry uses the viewer's 'sys-viewer-' registry entry (e.g. 'sys-viewer-vclntste'). See the Standard Registry section in Registry Viewer for additional Registry Id formats to allow entries for specific Users, Branches, Security, or User Groups to override the main entry.

This functionality also applies to New Call. See Required/Disabled Fields in New Call for additional details.

Multiple Line Entries

SAMPro provides multiple registry line support to the RequiredFieldsParent, RequiredFieldschild, DisabledFieldsParent, and DisabledFieldschild Setting Keys. This allows users to tag enough as many fields as needed, without encountering limitations due to long field names and the character limit of the Setting Value.

Setting Required Fields for the Parent

To indicate required fields in the parent, use the 'requiredFieldsParent’ key.

The contents of the line can be a field name or a series of field names separated by commas. When you place the mouse pointer over the field, the database field name will appear in the extreme left at the bottom of the screen. The internal field name appears just to its right – this is the name that we need. Strip off the leading group name but include any subgroup names which appear.

In the following example, we want to make the Site's closing call script a required field. With the cursor over the field, we see the database name, the leading group name, and the field name.

This registry would be:

Id: sys-viewer-vclntste

Setting Key: RequiredFieldsParent   Setting Value: clsng.cllscrpt: cllscrpt.id

If a subgroup name exists (in this case, lsng.cllscrpt:), be sure to include the blank space between the subgroup name and the field name, as shown above. However, the Setting Value must not begin with a space.

Example for Employee Viewer

Require that the Payroll Period Per Year is set in the Employee record.

Id:  sys-viewer-vemplye

Setting Key: RequiredFieldsParent Setting Value: emplye.py-prds

Example for New Call

Require that a Technician is assigned in the New Call Screen before adding the work order:

Id: sys-start-snwcll

Setting Key: RequiredFieldsParent Setting Value: tchncn.id

See Required/Disabled Fields in New Call for additional details.

Examples for Attachments

Required fields via registry in sys-viewer-vdcmnt are only supported when accessing the View Document record standalone - not through the paperclip Attach button on the toolbar of any viewer. In order to make a required field in View Documents for a particular viewer the registry must be set in sys-viewerX-vattchmnt. The X is necessary in this registry Id.

Registry Id: sys-viewerx-vattchmnt

Setting Key: RequiredFieldsParent   Setting Value: FieldName

Setting Required Fields for the Child

To indicate required fields in a child, use the 'requiredFieldsXXXX' key where 'XXXX' is the name of the appropriate child pane. Remember that to identify the name of a child position the mouse pointer to the extreme upper left corner of the child window. The form name will appear in the status pane at the bottom of the screen. Note that the system is smart enough to ignore a required field in a blank line.

The contents of the line can be a field name or a series of field names separated by commas. Do not include the leading group name but intermediate subgroup names must be included.

Tip: See the following for an illustrated example of locating the correct field and tab names: Interrnal Registry Entry Set Disabled Fields.

Invalid field names are ignored unless they are preceeded by a tilda ('~'). A leading tilda instructs Sampro to spell check the field name and display an error message if the field name is invalid. Spell checking is done when the target record (not the Registry record) is saved.Note that for this mod, the registry entry is not cached so that you can work on the registry entry in one window and test the target viewer in another.

Example for 'sys-viewer-vclntste':
requiredFieldsParent = accntmngr.id, wo-dsptchr: dsptchr.id 
requiredFieldsChild = clntstebllngschdle.dte-bll 

Example for ‘sys-viewer-vwrkordr’ to make the Equipment Id required on the Other tab:

 Setting Key: requiredFieldschild2 Setting Value: wrkordrothr.e: clntsteeqpmnt.id

Note that the Set Color button should be used to set the background color of required fields.