User attribute values from a container/note?

Hi there. Apologies if this is answered elsewhere but couldn’t find it…

Is there any way I can populate a user-defined attribute’s fields with possible values (eg. note titles) found elsewhere (eg. a container of notes).

I’d love to have a drop-down/autocomplete functionality, spreadsheet-style, where I can edit the source notes and the user attribute possibilities auto-update.

Cheers.
Adam

Perhaps this? https://www.acrobatfaq.com/atbref8/index/ObjectsConcepts/Concepts/Attributes/AttributesDataTypes/SetDataType.html
I’ll leave the experts to talk about auto-update …

Generally, String, Number, Set and List types auto-populate a value pop-up list of existing values used (in the entire document) for that attribute. The list will show up to 999 items, listed in case-insensitive lexical sort order (or number sequence for Number-type). In the case of multi-value attributes (Set and List types), items used by the current note are ticked in the pop-up list.

This pop-up list can be seen in attribute value boxes in both text pane key attribute tables and in the attributes tab of Get Info dialogs. It is also used to populate a pop-up on the Quickstamp Inspector.

A further aspect is that it is possible to pre-populate this list with ‘suggested’ [sic] values that are listed even in advance of any note using them. However, it is not possible to restrict notes to a particular set of values.

Attribute Browser view offers a visual way to explore the values of a given attribute. It can also be set in scope to reflect only part of the current document, the scope being either a a container (and descendants) within the overall document or an ad hoc scope via an agent.

Viewed from an action-code perspective, values() can be used to collect all values used by a given attribute. It defaults to document scope but an optional parameter allows a more restrictive scope.

So that is the range of ways of getting/seeing attribute values.

A user-defined attribute doesn’t have ‘fields’, just a value (or value(s) for Set/List types). I assume you’re thus referring to the attribute’s value. If so…

It sounds like you want to use a scoped values() action for $Name, scoped to only find the notes of interest. Alternatives are to use collect() or collect_if() action

If not attribute value(s), please can you clarify in more detail the actual task. I sense you’re working back from an envisaged outcome or another app’s workflow. Defining the task in the context of Tinderbox (as opposed to some other context) will make it easier for your fellow Tinderbox users here to help you.

Are you asking for a grid where you edit a value of some other note from the current note’s context? I’m not sure, based on your description, that such is possible. However…

If you envisage a grid where each target note is a row and each column is the value of an attribute and editing cell edits the value for a note/attribute context, I’d say this can’t be done in the form described. The closest would be to try using Attribute Browser view with column view enabled. But column view with many columns will tend to tax the app’s performance in a big doc. With a better understanding of at actual task or a demo file to work with, I suspect there are easier/better ways to the same end (albeit via a different route) using the features that Tinderbox already offers.

1 Like

Thanks for the detailed reply @mwra. I’ll have to take time to digest this…rethink my note structure and apply.

Apologies for any confusion - yes “values”, not “fields”… and not interested in a grid like a spreadsheet, just the drop-down list functionality I have used within a cell of spreadsheets, where the drop-down list selection is created on another spreadsheet page.

As a quick example: Say I have a note using the “reference” prototype with Key Attribute “author”. Can values for “author” be populated from another container holdings notes for document authors? I create author notes and later when I create notes for a reference/document, I just select the values from a drop-down list?

Conversely, when I create a new note for a reference, and the author note does not yet exist, can it be created by entering the $Name in the key attribute window?

No worries. If I sounded harsh, it wasn’t meant. So often thread here start out with mapping concepts to some other map I’m less ready you guess meaning (so as to not write a long essay on the wrong topic!).

Very likely, but how does a reference note know who are the author(s) of the reference? Does an ‘author’ note know the titles (or some other per-document info about the reference)? Is there really only one author per reference as implied by you questions.

Separately: is your attribute really called ‘author’? The latter is an allowed reference name, but the general style of Tinderbox attribute naming would use ‘Author’. It’s not a prohibition but using Tinderbox syles may make many of the help/forum examples easier to use.