Tinderbox Forum

Validation of Attributes

I am completely new to Tinderbox, which I am trying better to understand from the documentation and videos before committing to a licence.

The approach taken to managing notes seems very similar to the entity-attribute-value model for generalised data; in this case the entity being a note. I would like to understand two things better: whether, and if so how, attributes can be validated; and can links between notes be held as attributes?

Regarding the first, I understand that when a user attribute is defined it can be given one of a small number of built in types – string, number, URL etc. I would like to go further and constrain the value that can assigned to an attribute. For example, if I have an attribute called “altitude”, which records the height above some datum of an object, the value can’t be less than zero and shouldn’t be more than some maximum. The general solution would be to attach code to the attribute that is triggered whenever an instance of the attribute (i.e. the value of it for some note) is updated. I’m not convinced that this is an appropriate task for an agent, which I understand to be triggered whenever a note is created not, as needed here, before the note is saved.

Regarding the second question, it’s really a question of enforcing (in database terms) referential integrity. For example, if I have a collection of notes relating to different Authors, all derived from an Author prototype (aside, am I correct in thinking the prototype is also the collection?) and I create a note related to a Book which has an attribute “author”, I don’t want it to be just a string (albeit that Tinderbox will prompt me with all values of author as I type), but a link that I can follow. Is this possible? I know I can put a ?ziplink in the text, but that’s not a reliable technique for ensuring all Books are attributed to an Author and I am prompted to create on if he or she doesn’t yet have a note.

Thanks for any help.

Validation

The natural way to do this is with a Rule – a piece of code that runs from time to time. For example, we might have:

if($Altitude<0) { $Altitude=0; }
if($Altitude>29029) {$Altitude=29029;}

Rules can be associated with any note. They’re often inherited from prototypes; for example, all notes about Places could share this rule, while notes about Aircraft could have different constraints.

Referential Integrity

I don’t completely follow your discussion, but let’s talk about the underlying question of connecting a Book note to corresponding Author notes. You’re right in thinking that links are good for this:

  • You know there’s a note at the far end of the link; a string might be mistyped and not correspond to anyone.
  • You can follow the link easily to learn about the author.
  • If you have two authors, both named Mark Bernstein, it’s easy to link to Mark Bernstein who writes software or to Mark Bernstein who writes about medicine.

So, you might well establish the expectation that each book should be linked to an Author. The question now arises, how do you want to enforce the expectation? I can imagine a variety of policies, all of which should be straightforward to enforce in Tinderbox:

  • Tinderbox should remind you, when you add a new Book, to link it to an author.
  • Tinderbox offers you a place in which to write the author’s name, and uses that to make the link automatically if it can.
  • Tinderbox adds the new Book to a list of “Books That Need Author Links”, where it will remain until you either add an Author or link to book to “No Author” or to “Unknown Author”.
  • Tinderbox adds a memo to your dashboard suggesting that you link your new Book to an Author; if you haven’t linked the book within a week, Tinderbox decides you know what you want and stops reminding you.
  • Tinderbox adds a Badge or a Flag to the Book to show it’s not linked to an author; after you’ve made the link, the badge is removed automatically. You may also choose to remove the badge yourself.
  • As above, but if you remove the badge without making the link, Tinderbox will restore the badge.
1 Like

Thank you @eastgate for your prompt and informative replies. I hadn’t come across rules, but they certainly seem to be what’s required and will look them up in the manual.

I’m beginning to see Tinderbox as very much more than yet another spin on a note taking app. From what I’ve seen it would almost be better described as a tool for building knowledge graphs. The containment and prototype based inheritance allow (rapid) construction graphs of structured information, the “note” is really just a flexible contained of attributes, one of which is the text itself. I’m seeing the text of a note as a very useful way capturing unstructured data that can be refined and structured as it’s understood.

Regarding your second response, your bullet points indicate to me to that Tinderbox can react to the absence of information in a far more – albeit user programmed – manner than relational databases can.

The part of the question I didn’t express is, are the links between notes that I can create on a map view stored as attributes on one or both of the connected notes?

And the corollary, if I create a note with attribute that is a link to another note, will it appear as a link in the map view?

Thanks again

You’re right about the genesis of Tinderbox, which builds on ideas from early knowledge-representation systems like KEE and Aquanet.

We don’t say that links are stored as attributes because their semantics are different: for example, attributes are inherited, and attributes are shared with aliases, but links aren’t inherited and aliases have their own links.

But, yes, actions can get information about links, either inbound or outbound, from any note.

Welcome, and I do hope you take the plunge. Tinderbox is a deep tool which repays engagement. Literally just submitted a paper, the dataset leading to which I couldn’t have imagined in a less flexible tool. If you count Storyspace—Tinderbox’s older sister—@eastgate’s been in this space since before the Web. Tinderbox’s pay-off is it’s depth and the experience behind it.

1 Like

I love this forum. That’s all.

3 Likes

Rules are part of action code. Here is a video you might find helpful: Tinderbox Training Video 48 - Demystifying Action Code Part 1.

@GaiusScotius I hope to have a training video done on links shortly. In the meantime, I’d like to emphasize, as noted above, that data can be transferred up and down the change of links, both as one-time actions based on link types and programmatically through action code. This is extremely powerful. Links can be viewed in map view, in the link pane, hyperbolic view. You can also is there are links to a note in all the other view. Using the link pane you can actually see into the text of notes and even “tear-off” a linked note into a standalone text window. This torn off note editable, including the attributes. Again, I’ll include a review of this in my video.

Yup, this is true. We’ve been having a fun exchange about this here: On knowledge management, Tinderbox in relation to other apps. Please join in on the fun.

Finally, we host meetup every Saturday morning from 9:00~10:30 PST, please join us: Saturday Meetup.

You can ask your questions via the zoom and the community can help you think through how to use Tinderbox to achieve your goals; you’ll also meet a diverse, global, group of wonderful people.

I’ve grown tremendously from my interactions with each and everyone of the community members, and not just about Tinderbox. I’ve also learned about computing theory and history, run commands, markdown, teaching, writing, moderating, communicating, child psychology, greek philosophy, engineering standards, education, script writing, choir management, architectural history, sales, metacognition, qualitative data analysis, incremental formalization, presenting, visual design, CSS, HTML, industry mapping, video production, publishing, linking and graphing, hypertext, countless application that work alongside Tinderbox (Devonthink, TextExpander, Zotero, Bookends, pandoc, Highlights, RegEx, BBEdit, iTerm…the list goes on), patience, trust, humanity, leadership, service, effective knowledge management and sense making strategies, and myself (what to improve on and do differently, stop doing, and keep doing; how to focus and listen, while keeping that puppy dog excitement), and so much more.

I’m VERY grateful. :pray::heart::pray:

Oh, and

It can be, but I don’t think this a good way of thinking about prototypes.

In Tinderbox notes are like stem cells, they provide structure, function, are the foundation of “knowledge”. Every note has every attribute associated with it, whether or not the attribute has a value or note, is visible or not. The values of attributes are used by Tinderbox to perform actions and apply treatment to notes and to store values. There are both system attributes and user-generated attributes (some of my files have nearly 10,000 notes and 450+ user-generated attributes).

Tinderbox supports a concept of inheritance, meaning that in can inherit forum, function, and attribute values from the OS, the app, prototypes, etc. What a prototype is assigned to one or more notes the attribute values of the notes will inherit any changes made in the prototype; that is unless you break this inheritance for one more attribute by adjusting the value of an attribute on a note. When you do this the local value of the attribute will be safe from being overwritten while all the other attributes will still inherit from the prototype. You can always reestablish the inheritance if and when you want to.

Anyway, that’s enough for now. I’m sure you’ll come to love this app. I spend at least 80% of my day in it now.

1 Like