User Attributes or Tags?


(Jake Bernstein) #61

No need for that, good sir!

You are correct that TBX is not an everything bucket, nor would I want to make it into one. I’ve come to peace with the notion that sometimes, multiple tools are better than one AllTool (which often isn’t that good at anything in particular).

What I would like to see, however, is the ability to at least put Watched folders in sub-containers. Why? Because I like having a “Work Portal.tbx” that I use to keep track of and pontificate on a great number of related things. And I simply have a lot of DTPO Groups I’d like to watch and import into certain TBX containers (mostly I’m thinking of my Markdown note docs in individual client matter groups within my Client Projects DTPO database).


(Rick) #62

I tried both of these examples. The Authors one worked nicely. I couldn’t work out how to do the first one. Should that expression be inserted in the new note’s rule field? And is $MySet a user attribute that you’ve previously set elsewhere?


(Paul Walters) #63

The $MySet=values("Tags"); action code can be used in a Rule, in a Stamp, or in an Agent. Without values in the $Tags attribute for a given note, nothing will happen.

$MySet is a system attribute in the Sandbox* category – it’s included with Tinderbox to assist your testing or experimentation and can be used the same as any set attribute you create.


* there are several other attributes in this category such as $MyString, $MyList, etc.


(Rick) #64

I’m guessing this points to an indirect way of doing what I want to do. Whereas

$Text=values(“Authors”).isort.format("\n");

creates a note directly that shows a list of all authors in the document,

$MySet = values(“Authors”);

would fill the $MySet attribute with all the $Authors used in the document, but I would need to “call” (probably the wrong term?) the contents of $MySet somewhere else to accomplish anything. I have a vague inkling that that could be super-valuable but I think it’s going to take some time before I can really understand and use that knowledge. I think I’d better leave this alone for now. Thanks for trying to explain.


(Paul Walters) #65

Don’t overthink it --it’s just an attribute and can be used wherever you want to use an attribute. Like in Key Attributes for a note, or in a prototype, etc. There is nothing special or unusual about $MySet – and you can create your own attributes that are set types, like $MiaAro or $MonSet or $AdorableDogNames, or whatever.


(Mark Anderson) #66

Further to @PaulWalters’ description, the Sandbox group of system attributes, arose as a formalisation of early practice in the original user wiki (now closed). The idea was, when giving code examples, to indicate the data type returned by an operator or the type to which one wanted the returned data to be coerced. Thus $MyString is both a term meaning any String-type attribute and, thanks to the Sandbox attributes, a String attribute pre-supplied so you can run the example with no/little extra re-configuration of of your document.

@rickdude I notice the values() code example of mine that you quote has curly double-quotes rather than straight-ones (probably due to unasked-for autocorrect). Anyway, that example will fail unless the curly double quotes are changed to straight double quotes.