Your KB can also obtain other values that are part of an item's knowledge, such as the location of the item upon its workspace, its relations or connections, the text attribute of a procedure, rule, or other text-based item, and the value given by a variable or parameter. For description of the kinds of information that are part of an item's knowledge, see Understanding the Knowledge Contained in Items.
Using Attribute Values
An item can store values in its attributes. An attribute might also have no value, in which case G2 displays the symbol none as its value in an attribute table. conclude and change actions to update the values of all user-defined attributes and most system-defined attributes as follows:
| Use this action: | For system-defined attributes that are: |
|---|---|
conclude that the x of y = value
|
value-writable
|
change the text of the x of y to "text-value"
|
text-writable
|
Each chapter of this document that describes a system-defined class includes a section describing the characteristics of each system-defined attribute. Check there to find which attributes you can edit. Refer to the G2 Class Reference Manual for information about whether an attribute is value- or text-writable.
Using Text Attribute Values of Items
Some items include a text value, which is distinct from other attributes. This text attribute appears in the attribute table of relevant items without an attribute name called Text, but is referred to programmatically with the expression the text of y, where y is any item of these classes:
For more information about messages and each free text, borderless free text, word inserter, character inserter, or character sequence inserters see Chapter 31, Messages and Chapter 28, Text Items.
The text attribute of an item always stores a value of type text. For more information about text values, see Using the Text Type.
Using Values Given by Variables and Parameters
Each variable and parameter stores a value that is distinct from the values of its attributes. See Chapter 15, Variables and Parameters for more information.
Checking for the Existence of an Attribute Value
The attributes of items can hold values, a subobject, or nothing, which appears as none.
exists
has a value
has a current value
Using Local Names for Values
Your KB can also declare and manipulate values that are not part of any item's knowledge and that exist only when the current KB is running. For instance, you can use local names to represent values used only within one rule or procedure. See Using Local Names in Expressions.
Expiration of Variable Values
The value of each instance of a variable has an expiration time, which is the time interval after which G2 must perform data seeking to obtain a valid value. The expiration time can be never, indicating that the value is valid indefinitely. Validity-interval attribute. If a variable value expires, and is then required by an expression referring to that value, G2 attempts to obtain a new value to replace the expired one.