This allows the user to view the current document's user-defined (i.e. custom) attributes. This Inspector allows the user to view and change their data type and default values.
Attribute. This pop-up menu lists all User attributes already defined (otherwise the list is empty). Selecting a list item loads it into the Name box below the pop-up.
Gear wheel button (right):
- Delete user attribute. Press this option to delete the attribute currently shown in the Name box. See more detail below.
- New user attribute. Press this option to add a new user attribute. See more detail below.
Name. Shows the name of the selected Attribute. Also used for setting the name of a new attribute. This input rejects attempts to create an attribute name that contains operators like + or punctuation like ";".
Type. The data type for the selected attribute. Open the pop-up to change the data type. The change is saved as soon as this control loses focus.
Default. This box shows the program's default for the attribute's selected Type (more on data types). The value may be left as the default or set to a desired initial value.
Suggested. Enter an optional list (semi-colon delimited) of suggested attribute values.
sequential (tick-box). An option only for Number-type attributes. When ticked all notes, including existing notes are allocated a sequential number. Unused numbers, e.g. from deleted notes, are not re-used making the number also a unique identifier. notes duplicated or copied/pasted are allocated a new number. Aliases use the original's value.
Displayed attribute for selected notes. Ticking this box will add the attribute as a Displayed Attribute to all currently selected items (adding to existing Displayed Attributes if found). In general this is a less useful way of adding Displayed Attributes than using the control at the top of the text pane. As changing the value here changes the note's $DisplayedAttributes, it is not the best method to set/manage Displayed Attributes if using prototypes as the edit may break inheritance of the attribute (more on Displayed Attributes). If some selected items do not use this Displayed Attribute and some do, the box remains un-ticked. ticking it sets this for the whole selection.
Description. This holds an optional user's description of the intent and/or usage of the attribute. The description is only seen in the inspector when when the attribute is actually selected. The value is stored in the TBX but cannot be accessed except via this Inspector.
Creating a New User Attribute
On selecting the option to make a new attribute, the Attribute pop-up will change to show 'NewAttribute'. The Name box is not refreshed; any previously shown attribute name is retained deliberately, in case it is to be used as part of the new attribute. Edit or delete the existing text to add the desired new value. The new attribute is created as soon as focus shifts away from the Name box. The default data type is 'string' and the default value is no value, i.e. an empty string. Optionally, a description of the attribute, e.g. its purpose, my be added. The latter description is only seen in this Inspector and when this attribute is selected.
When a 'new attribute' is selected, the existing selected attribute name is retained but all other value input boxes on the Inspector are reset to their default; changing the data type also resets the appropriate default for that data type.
- User Attribute Inspector. When a new attribute is created, or when the type of an existing attribute is changed, the default value of that attribute is now reset to a conventional value. For example, the default value for a new numerical attribute is 0, and the default value for a new Boolean attribute is false. (1965) When a 'new attribute' is selected, the existing selected attribute name is retained but all other value input boxes are reset to default.
- User Attribute Inspector. (2149)
Altering an existing attribute
Note: there is no undo for this operation.
Select the attribute from the Attribute list. Name, Type, Default, Description and tick-box settings can all be changed. The changes take effect once focus moves off the edited input box. When a user attribute is renamed, the values of the old attribute are moved to the new attribute, and Displayed Attributes referring to the new attribute are updated to use the new attribute. But, before changing data type, do consider the effects: it may make more sense to make a new attribute of the desired type and use an agent to copy values across with whatever additional changes are needed over and above basic type coercion. Changes to the attribute name will update Displayed Attributes but do not update attribute names in action code (e.g. roles, edicts, etc.). If using action code in a TBX, consider this aspect before altering an existing attribute.
Deleting a User Attribute
Select the attribute to be deleted sing the Attribute list. Once selected, chose the Delete user attribute option. The selected item is deleted immediately. Note: there is no undo for this operation.