SBM ModScript Reference → Programming SBM ModScript → Application Objects → Object Types → VarFieldList
Primary and Auxiliary tables allow the user to add columns, and these user-defined columns are known as "variable fields." A VarFieldList is a list of Field objects representing the variable fields of a primary or auxiliary item. Note that Field is a subtype of AppRecord. It is possible to create your own VarFieldList object, in which case it will contain any Field objects you choose to add to it, not necessarily corresponding to the variable fields for any existing table.
AppRecordList->VarFieldList
ApplyProjectStateOverrides(): This sub-routine should be used when reading an SBM primary or auxiliary item directly out of the database and you wish to use the state field ordering for the item. You can then view a particular field in the list and call Field.GetDisplayValue to check the current user's privileges.
Input: N/A
Output: N/A
Return: N/A
FindField(fldNameOrId): Find the first field on the list matching the given name or TS_ID.
Input: fldNameOrId (string or Long Integer) – If a non-numeric string, the name of the field to be looked up. If all uppercase, it is taken as the field's database name. Otherwise, it is taken as the display name. The search is not case sensitive; case is only used to determine whether to search by database name or display name. Note that the database name cannot be changed, but the logical name can be changed any time by the SBM administrator. If fldnameOrId is not a non-numeric string, it is converted to a long integer and taken as the desired field's TS_ID.
Output: N/A
Return: (Field object) – The first Field on the list to match the given name or ID. If no Field objects matched, it returns the global constant Nothing.
FindSysField(syscode): System Fields are fields that have special built-in meaning to SBM. They are always installed and cannot be deleted. Every such field has a "syscode" that is unique within the field's table and identifies it by number. The SBM schema document lists all the system codes for each table.
Input: syscode (Long Integer) – The system code of the field to be found.
Output: N/A
Return: (Field object) – The Field on the list matching the given syscode. If no Field objects matched, it returns the global constant Nothing.
SelectAll(selectFlag): Can force all fields to be examined for changes (or ignored) on the next Update(), overriding the effect of the Field method Select(). Each Field object on the list has a "select flag" telling whether it will be skipped for performance reasons on the next Update(). If a Field's value is known not to have changed, it is often deselected. SelectAll() sets all fields' select flags to True or False, causing all fields to be examined or ignored, respectively.
Input: selectFlag (bool) – Optional, defaults to True if not supplied. The value to which all Fields' select flags will be set.
Output: N/A
Return: N/A
Copyright © 2007–2017 Serena Software, Inc. All rights reserved.