Operator Type:
Operator Scope of Action:
Operator Purpose:
Data Type Returned:
Operator First Added:
Operator in Current Baseline:
Operator Last Altered:
Operator Has Optional Arguments:
Function [other Function type actions]
Item [operators of similar scope]
Data manipulation [other Data manipulation operators]
success boolean
v7.0.0
Baseline
As at baseline
hasLocalValue(attributeNameStr[,item])
For the current note this tests if an attribute name attributeNameStr has a locally set value (returning a Boolean true
), or whether that value is inherited from a prototype or document default (false
). The main input is a quote-enclosed system or currently defined user attribute (without a $ prefix):
$MyBoolean = hasLocalValue("Rule")
The arguments are evaluated, so
$MyBoolean = hasLocalValue($MyString)
returns information about the attribute whose name is currently saved as the current note's value of $MyString.
The note evaluated is the current note. The 'item' input allows for offset addressing. For example:
$MyBoolean = hasLocalValue("Rule","Some Note")
checks the local value status of $Rule not for the current note but for the note called "Some Note"
As the operator returns a boolean, it can be used in a query in agents or find(), like so:
$MyBoolean = hasLocalValue("Edict")
in this case matching any note with a locally-set $Edict value.
Note: most users will not have need of this but it is useful in very large document to find the odd note with a local setting, when visual review would take too long. It is also useful where (re-)inheritance of attribute values appears broken or is not reset as expected.
See also—notes linking to here: