Custom Attributes
Custom attributes allow additional non-standard properties to be specified in configuration. They can be added to controls, columns and/or links.
Note: Custom attributes are typically used by Tribal to introduce custom behaviour into screens, and a setting cannot be guaranteed to work in every situation.
Parameters usually take the form of <attribute>=<attributevalue>, where an attribute value of '1' indicates on and '0' indicates off. Multiple custom attributes can be used on single elements, with each attribute pair being separated by a pipe symbol (for example: USEALTERNATEVALIDATION=1|ISNULLABLE=1|HIDESEARCH=1).
Select from the following to view examples of custom attributes for different elements:
A selection of available custom attributes for columns are described in the following table.
Custom Attribute | Description |
---|---|
ALLOWCOLUMNSORTING or ALLOWSORTING |
Allows a grid column header to be clicked, which sorts the data by values in that column. Note: Sorting is enabled by default when this attribute is not present. Usage: ALLOWCOLUMNSORTING=0|1 or ALLOWSORTING=0|1 |
ALLOWEMPTYPARAMS |
Use this attribute for a verifier drop-down control to indicate that you still want to try and retrieve data if a defined parameter does not contain data. Usage: ALLOWEMPTYPARAMS=0|1 Example: in the Support Plans grid in Support Fund Manager, the Support Type drop-down is filtered by the Cost Category (if set). If the Cost Category is not populated, the inclusion of this parameter means the Support Type drop-down displays every available value - default behaviour would be to display nothing. |
ALLOWLEGACYVALUE |
For drop-downs and input search controls, if a value has been entered that was previously valid, but is no longer valid (for example: the reference data has been deactivated), this setting displays the previously-entered value and does not force the user to change to a valid value. Usage: ALLOWLEGACYVALUE=0|1 |
CELLSTYLE |
Used to introduce custom cell styling to a column. For example: the Status column in the Licence Admin grid. The styles applied are defined in code, so cannot be configured onto any grid. Usage: CELLSTYLE=<Style name> |
CHARACTERCASING |
Controls the casing of text entered. Note: The legal values for this custom attribute are sourced from the System.Windows.Controls.CharacterCasing enumeration and should successfully parse using Enum.Parse. Usage: CHARACTERCASING=Lower|Upper|Normal |
CUSTOMLIST |
Typically, a verifier list of values (LOV) configured column is assigned a column data type. This data type includes SQL that selects two columns, aliased as code or description for the items to be shown in the list. However, if this list of data is more static, or cannot come from the database, the CUSTOMLIST custom attribute exists to allow the configuration of the list of items. Usage: CUSTOMLIST=<Item description>:<Item code>[,<Item description>:<Item code>,...] |
DISPLAYDESCRIPTION |
When a verifier list of values (LOV - combo box) field is in a grid that is not editable, this custom attribute controls what is displayed in the cell. By default, the key (that is: database value) is displayed, but by enabling this feature, the description for the key will be displayed (for example: for progress codes, 'A' would display as 'Active' when using this custom attribute). Usage: DISPLAYDESCRIPTION Note: No attribute value is required. |
FILTERCOLUMN |
Specifies filter columns used to filter results. It is only used in Curriculum Manager pages to filter UIOs. Usage: FILTERCOLUMN=<Column name> |
FOOTERTOOLTIP |
Denotes the tooltip for a footer cell. The cells may be merged if the FOOTERHEADER is set to the same text. In this case, the tooltip is shared between cells. Usage: FOOTERTOOLTIP=<Tooltip text> |
FOOTERHEADER |
Denotes the tooltip for a footer cell. The cells may be merged if the FOOTERHEADER is set to the same text. In this case the tooltip is shared between cells. Usage: FOOTERHEADERn=<Cell footer text, where n is the footer row> |
FORCEHIDDEN |
Includes all hidden columns (even if they are not mandatory), to be included in 'retrieve' queries. Usage: FORCEHIDDEN Note: No attribute value is required. |
FOREIGNKEYTABLE |
These attributes are used in conjunction with MULTITABLEUPDATE to describe the relationship between the subsidiary tables. Usage: FOREIGNKEYTABLE=<Table name>, FOREIGNKEYTABLEREF=<Table reference>, FOREIGNKEYTABLECOLUMN=<Column name> Example: FOREIGNKEYTABLE=UNIT_INSTANCES|FOREIGNKEYTABLEREF=UNIT_INSTANCES|FOREIGNKEYTABLECOLUMN=FES_UNIT_INSTANCE_CODE |
FOREIGNKEYTABLECOLUMN | |
FOREIGNKEYTABLEREF | |
FORMATMASK |
Applies a C# format string to a control to limit the style of data that can be entered. Example: for the UIOs grid in Curriculum Manager, the Start Time and End Time are restricted with FORMATMASK=ii:ii. Usage: FORMATMASK=ii:ii|ddddd|dddddddddd and so on. |
GROUPCOLOUR |
Sets the colour of a column in a grid. This is linked to the GROUPCOLOURS attribute at control level. Usage: GROUPCOLOUR=<Group name> Example: GROUPCOLOUR=Learner FAM |
INCLUDEINQUERY |
Excludes a column from the underlying query when selecting data. This allows for the addition of 'dummy' columns that are not linked to a database element (for example: for spacing purposes). Usage: INCLUDEINQUERY=0|1 |
INCLUDEINSEARCHBUILDER |
Whether to include columns in search builder conditions. Inserting 'INCLUDEINSEARCHBUILDER=0' in a column excludes that column from being added. Note: Columns are included in the Search builder by default. Usage: INCLUDEINSEARCHBUILDER=0|1 |
LLWR_REDUNDANT_FIELD |
Changes the column background colour to indicate a column is redundant. This is only relevant to the LLWR module. Usage: LLWR_REDUNDANT_FIELD Note: No attribute value is required. |
MANDATORYCONDITION |
Conditions in search controls are usually only applied if they are visible. There may be certain circumstances in which you require a condition with a default value to be applied, even though the search condition is not visible (for example: where you need to always restrict a search to the current context, but not give the user an option to override that context). Inserting the MANDATORYCONDITION=1 attribute ensures that the condition is evaluated despite not being visible. Usage: MANDATORYCONDITION=0|1 |
NEGATIVEBOOLEAN |
Specifies that -1 should be returned when a check box is checked, otherwise a value of 0 is returned. Usage: NEGATIVEBOOLEAN=1 |
PREPAREINPUTSEARCHCOLUMNS |
Applied to input search controls and specifies extra search conditions that should be added to the search string. Usage: PREPAREINPUTSEARCHCOLUMNS=<ColumnName0>[#ColumnValue0],<ColumnName1>[#ColumnValue1],...,<ColumnNameN>[#ColumnValueN] |
OBTAINDATA |
This custom attribute is useful when a control cannot be removed from configuration since code has been based on it. Whilst such a scenario would ideally be fixed in C# as a bug, applying this attribute improves screen load performance by preventing the control from loading any data. Usage: OBTAINDATA=0|1 |
OMITINEXTENDEDPROPERTIES |
Controls whether the column configuration should be included in excluding columns as extended properties when generating data entities via the populate method from a data marshaller. If this custom attribute is used with a value of 0 for a column, then when the columns are being processed to generate a data entity, the column will be included as an extended property. Typically, this attribute is used to ignore a column in the selection list and is not specified when the column is required, as selection is the default behaviour. Usage: OMITINEXTENDEDPROPERTIES=0|1 Note: Tribal use only |
SEARCHBUILDER_AVAILABLE |
Controls whether or not the searchbuilder control is available. Note: This is only supported in the Docs and Comms module. Usage: SEARCHBUILDER_AVAILABLE=0|1 |
SEARCHONYN |
Inserts a check box in a Condition Builder when searching on Y/N column. By default, a text box in which you have to enter Y or N is displayed. Usage: SEARCHONYN=0|1 |
SHELLPOPUPSEARCH |
Enables a shell pop-up search. This can be used, for example, to create a custom search control. Usage: SHELLPOPUPSEARCH=<Screen name> |
SHOWGRIDCOLUMNTOOLTIP |
Enables or disables a column header tooltip. Usage: SHOWGRIDCOLUMNTOOLTIP=0|1 |
SINGLESELECT |
When this custom attribute is specified with a true value, the column which receives it will just allow a single selection against the grid (for example: instead of having multiple 'Y' selections, it functions as a radio button, and when you change your selection, it automatically changes the others to 'N'). Usage: SINGLESELECT=Y|1|-1 |
SORTCOLUMN |
When a UAFGrid is built from configuration, the column sorted by default in the underlying data when a column header is selected is the field that the column represents. However, this custom attribute allows another column to be specified. This is most useful when a column is displayed that contains the label of data in the form of key value pairs (Verifiers), but the code should be sorted by the selected column header. Usage: SORTCOLUMN=<Column name> |
STRINGFORMAT |
Controls how a value is rendered in the specified controls. Usage: STRINGFORMAT=<Format> Example: STRINGFORMAT={0:hh:mm} Example: STRINGFORMAT={0:dd/mm/yyyy} Example: STRINGFORMAT={0:0.##} |
USEALTERNATEVALIDATION |
Customise inputsearch behaviour. Note: This is for Tribal internal use only. |
VALIDATIONTRIGGER |
Controls whether a field is immediately validated when edited. Note: This is for Tribal internal use only. |
WHOLENUMBER |
Validates whole number text input only (for example: on an InputNumeric control, ordinarily, any number is permitted (that is:1.23). On enabling this attribute, 1.23 would fail validation but 1 or 123 would pass). Usage: WHOLENUMBER=0|1 Note: When used on a VerifierLov input control, the existence of the WHOLENUMBER custom attribute key will enable the feature. Any value can be given, but is ignored. |
A selection of available custom attributes for controls are described in the following table.
Custom Attribute | Description |
---|---|
BAND |
Defines on which row (that is: band) that a control is displayed on in the container. The top band is 0, the second band 1 and so on. Usage: BAND=<Band_number> |
BANDINDEX |
Defines the left-to-right display index of the control within the band. The left-most control is 0, the next control is 1 and so on. Usage: BANDINDEX=<Band index> |
COLFOOTERS |
Denotes the number of row footers required. Use HIDEFOOTER (1..n), FOOTERTOOLTIP (1..n) and FOOTERHEADER (1..n) to define the data displayed in each column of the footer. Usage: COLFOOTERS=<Number of column footers > |
DISPLAYSEARCHOPTIONS |
When an input control is used in an editable grid or in the Standard, normally an optional label is displayed by the control. If this custom attribute is enabled on a column configuration, the search options combo box is displayed by the input control. An example of this feature in use is when the input controls are used as part of a search form. Next to each control, a combo box is rendered containing filter options relative to the data type being search (for example: Starts With, Ends With, Contains, and so on for a string column, or >, <, =, <> for a numeric column). Usage: DISPLAYSEARCHOPTIONS=0|1 |
GROUPCOLOUR |
Set the colour of a column in a grid. This is linked to the GROUPCOLOURS attribute at column level. Usage: GROUPCOLOUR=<Group name> Example: GROUPCOLOUR=Learner FAM |
MULTITABLEUPDATE |
Update data in more than one table at once. Note: This can only be used in specific parts of ebs: central as some elements require more complex logic that is hardcoded to pages. Usage: MULTITABLEUPDATE=<Table name> |
OPTIMISTICFIRSTBATCHLOAD |
Used on grids to optimise grid performance by loading the first batch of data quickly. This is on by default, so this can be used to turn the behaviour off. This is done in the ILR wideboy and Curriculum grids. Usage: OPTIMISTICFIRSTBATCHLOAD=1. |
SELECTFIRSTELEMENT |
When this custom attribute is specified with a value of 1, the first editable column control in the standard will be focussed. Usage: SELECTFIRSTELEMENT=0|1 |
TABORIENTATION |
Controls the position of the tab strip on a tab control. By default, the tabs are on the top edge aligned to the left. Usage: TABORIENTATION=BottomLeft|BottomRight|LeftBottom|LeftTop|RightBottom|RightTop|TopLeft|TopRight Example: TABORIENTATION=LeftBottom|LeftTop - The tabs will be on the left edge, aligned to the top. |
UNLIMITEDROWS |
Controls whether unlimited rows will be returned. In order for batching (that is: pagination) to function in the grid (ALLOWBATCHING), this custom attribute must also be enabled. If batching is not enabled in the grid, the UNLIMITEDROWS custom attribute, if set, will still cause the UAF to generate a query that is paginated. However, the user will not be able to navigate to the second and subsequent pages of data. By default, unlimited rows in the UAFGrid is set to off. Usage: UNLIMITEDROWS=0|1 |
A selection of available custom attributes for links are described in the following table.
Custom Attribute | Description |
---|---|
KEYGESTURE |
Applies a key gesture to a configuration link in the navigation control. An optional number of modifiers can be specified, which identify which key (that is: Ctrl, Alt, Shift and so on) needs to be pressed before the actual key will activate. Usage: KEYGESTURE=[Modifier+[Modifier+...]]<Key> Example: KEYGESTURE=Ctrl+Alt+E |
WPFIMAGELARGE |
Specifies the image to be used for a ribbon button in the Shell when the button is being rendered full size. Usage: WPFIMAGELARGE=<component>,<folder>,<name> Note: The three components of the value for this custom attribute can be used to progressively specify what image is to be used. The images are ordinarily resources within a compiled C# assembly. |
WPFIMAGESMALL |
Specifies the image to be used for a ribbon button in the Shell when the button has been shrunk to small size. Usage: WPFIMAGESMALL=<component>,<folder>,<name> Note: The three components of the value for this custom attribute can be used to progressively specify what image is to be used. The images are ordinarily resources within a compiled C# assembly. |
WPFKEYTIP |
Specifies the combination of keys to use that would invoke the ribbon button's command when used via the keyboard. These keys can then be typed to select a tab, enter a section or click a button. Note: Modifiers are not used once key tip mode has been activated, so Alt, Ctrl, Shift and combinations of these keys cannot be specified. Usage: WPFKEYTIP=<Key(s)> |