This version is out of date, covering development from v9.5.0 to v9.7.3. It is maintained here only for inbound reference links from elsewhere. It is no longer actively updated.

Jump to the current version of aTbRef

Tinderbox v9 Icon

Suggest Attribute value lists

This is a means of pre-populating attribute value pop-up lists with values that may not yet be in use by any note. Suggested values apply to String/Set/List data types only. If the list of likely values is known in full (or part) before the such data is added to the document, it is easy to pre-populate the attributes value list via the 'Suggested' box on the relevant Inspector for User and (some) System attributes.

Suggested values always appear in the value menu of Displayed Attributes, and are always offered for autocompletion, even if no notes currently use them. Suggested values may be added to attributes

Pop-up value lists do not indicate which are suggested values. Thus it is not possible to tell apart currently used values solely by inspecting a pop-up that includes suggested values.

Defining suggested values

In the relevant Inspector, enter the list of suggested values as a semi-colon delimited list without any enclosing quotes; this follows the normal Tinderbox convention for defining a list in action code. Thus, to pre-populate an attribute with values 'Ant', 'Bee' and 'Cow' the unquoted string to enter into the Inspector's suggested box is Ant;Bee;Cow. A terminating semi-colon may be used but is not required. It can be helpful to prepare the list in the text of another note if it is long and will extend beyond the visible portion of the suggested box; copy the text and then delete the note.

If adding a list to a document that already has values, it may be useful to first test the new list in a new document to ensure the correct values show up in a Displayed Attributes pop-up. Indeed, this method does not prevent new values (i.e. those not in the suggested list) being used. If trying to assert a fixed list of values and new values are seen in the pop-up list, note the new value(s) and use an agent to find and correct the notes with the unwanted values.

Automatically setting suggested values

See Pre-populating Displayed Attributes pop-up lists.

values() and suggested values

Values that appear only in the suggested list, i.e. are not (yet) used by an actual note, are not included when using the values() action. Indeed, suggested values do not show up in values(), collect() and such, if not actually used by any note.

Legacy

A note for long-time users: this method replaces an older approach of making 'seed' notes as placeholders for desired prepared values.