Pointer+description

Pointer+view interface
Pointer cards let you create and maintain lists of cards.

 

They are a key tool in Wagneering, for relating cards to other cards.

 

For example, let's say you are setting up a Wagn for a conference that features lots of break-out sessions, and you want to know later who went to what session. You would create a Session cardtype, and on its form you would include a Pointer, which on each Session would list the people who participated in that session. What Pointers "point" to is one or more cards (or none), so in this example it would be pointing to each participant's User card.

 

This approach has several advantages over typing people's names into a regular text card:

  • You can pick an editing interface to suit the situation (auto-complete, checkboxes, dropdown menu, etc.)
  • There's no markup required to link to or include the cards you want to list.
  • You can easily set the views of all the items in the pointer wherever you include it using the "item" property. E.g.,   Items will appear by default in closed view.
  • You can draw on the information in other places. In the example given above, you could then add to the structure of User cards a Search card to automatically list the sessions they've attended.

 

In view mode, Pointers have an "add/edit" link beneath them which you can click on to go to edit mode.

 

Pointers have several different edit interfaces, which may be set using the *input setting.

 

To continue our example from above, assume you include a Pointer called "+participants" on the Session form. In that case, you can set "Participants+*right+*input" to be any of the following input types.

 

list

Pointer+edit interface
"List" view is the default interface for Pointers. It is basically a series of autocomplete fields.

 

In list view, when you start typing an item, Wagn will do its best to fill in the rest by listing the names of existing cards that begin with whatever you typed in (much like it does in the navbox).

 

radio

A list of radio buttons, each for one card. One and only one may be selected.

 

checkbox

A list of checkboxes, each for one card. You can select as few or as many as you want.

 

select

A dropdown menu of cards.

 

multiselect

A box listing all the relevant cards and allowing any number to be selected.

 

You don't want every card in your Wagn to be listed. Even a brand new "empty" Wagn has hundreds of cards, and yours may have thousands or more! To narrow the options, you can add a *options setting which will be a Pointer (by default, but it can also be a Search) for just the cards you want listed. For example, continuing the example if you add "participants+*right+*options" as a Search card with the CQL {"type": "User"} then only User cards would be listed when editing "Making Wikis Welcome+participants".

 

Actually, in that example there might be so many users that we wouldn't want to have all of the names on screen. If so, you'd use "list" as the *input setting, which lets people type in a name. This could be any card they want (even cards that don't yet exist), but the Pointer will autofill cards that are in +*options. So in our example, this would mean that if I typed "Ja", then the pointer would autocomplete users' names beginning with "Ja".


Option labels

 

Checkboxes and radio buttons can have supplementary information next to each option. Let's say in our conference website example that we invite each person to share information about themselves on their User card in an included card called "+about me". And then we decided it would be useful to show that information on the Session card when editing our +participant Pointer. We can achieve this by creating an "participant+*option label" setting and setting its content to be "about me".