Equinox Online Help - Language Reference - A to Z

Home

ShowRecordGroup

Applies to
SyntaxShowRecordGroup [FirstExpression, LastExpression, HowExpression]
Action[Statement] Allows a developer to apply filters to views of records.
ScopeOnly usable in form methods.
Notes

This statement shows or hides records from the current view according to their record group. The current view relates to all areas of the product where data can be manipulated, in the same way as ESS record permissions. The FirstExpression and LastExpression parameters relate to the range of record groups affected and must be in the range 1 to 1024. You cannot filter record group 0. HowExpression can have the following values:

  • 0 Hide
  • 1 Show
  • 2 Show only (no edit, or delete)

HowExpression defaults to 1 if omitted. If FirstExpression and LastExpression parameters are both omitted, the operation affects all groups. If only the FirstExpression or LastExpression is passed as a parameter the operation will affect only that one specified group. Note that the filter flag is effectively anded with the current user's RecordPermission rights. If the user does not have the necessary rights, ShowRecordGroups will not show the record. RecordPermissions() and 16 returns non-zero if the record is currently set to displayable by this statement.

The system workarea SysError is set to a non-zero value if an error occurs, otherwise zero.

CategoryForms, User, groups and ESS
See Also ChangeRecordGroup, CurrentRecordGroup, FieldPermissions, FirstUserGroup, FirstUserName, NextUserGroup, NextUserName, RecordPermissions, SetUserGroup, ShowRecordGroup, UserAccountExpiry, UserGroup, UserName, UserPasswordExpiry, UserPermission
Example

The first example enables all groups.

ShowRecordGroup

The next example hides record group 31 only.

ShowRecordGroup 31, , 0

This example shows for viewing only record groups 32-40.

ShowRecordGroup 32, 40, 2

The last example checks the user's rights to modify a record group's visibility before hiding group 10.

if (RecordPermissions("ROWLAND") And 16) then
ShowRecordGroup 10, , 0
else
Alert "Sorry you don't have the rights to do this."
end if