Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Excerpt
hiddentrue

Adding a column as a dropdown selection for each item using labels, metadata or users - Example 5, 6, 7

Table of Contents
minLevel3
maxLevel3
outlinefalse
indent0px
typelist
printablefalse

list select 
Anchor
checklist-select
checklist-select

macro
Code Block
{list-select}

Example 5 Adding a column as a dropdown metadata Yes/No selection for each item

You can define a column as a selection.

Let's say we need to define whether or not the oviparous (the egg laying animals) are swimmers.

So we add the following list macros

  • list macro filtered by the label oviparous

  • list-excerpt macro to display the classification in a column.

  • list-select macro with the values yes and no, for the last column of the list.

Info

For the list-select macro that we did not select the checkbox for Use labels, meaning that we are using a metadata value instead of a label.

Markup
Code Block
{list:label=oviparous|name=Swimmers|useboards=false} {list-excerpt:heading=Classification|width=10} {list-select:heading=Can swim?} Yes No {list-select} {list} 

This displays the following lists:


The metadata value for the Can Swim? metadata can be accessed later using list-attribute or any of the Comala Metadata macros.

For the  list-attribute macro, we indicate the attribute and the page

If the page is left blank in the Edit macro dialogue box, the macro will seek the Can Swim? metadata value from the current page.

In our example, the metadata values are displayed for the page specified in each of the macros.

The example uses a Confluence table to display each question and the metadata value.


Markup

Code Block
Can eagles swim? {checklist-attribute:attribute=Can swim?|page=Bald Eagle}

Can frogs swim? {checklist-attribute:attribute=Can swim?|page=Common Frog}

Example 6 Adding a column as a dropdown label selection for each item

list-select macro selection could use labels instead of metadata values.

Similar to Example 2, but in this example the actual labels used are birdfish, mammalamphibian or reptile but each option could have a different value from the actual caption. 

For example, the caption for the label fish is It's a fish, or for bird is It's a bird

In the body of the list-select macro each caption is defined as <value>|<caption>.

The  <value> is the actual label, the <caption> is the actual caption displayed.

The markup for this example is

Markup
Code Block
{list:label=oviparous|name=The oviparous|useboards=false} {list-select:heading=Type|uselabels=true} fish|It's a fish amphibians|It's an amphibian reptile|It's a reptile bird|It's a bird {list-select} {list}

Example 7 Adding a column as a dropdown user selection for each item

Users can also be selected using the list-select macro.

You can configure the list-select macro using the Edit macro dialogue box.

Users can be added as choices in the drop-down menu on the page by either:

  • using a Confluence group name to allow selection from the users who are members of the group.

  • using allto allow selection among all the existing users in the instance.

Markup

Code Block
{list:label=pets|name=Alpha Centauri Pets|useboards=false} {list-select:heading=Lead Owner|usersgroup=all} {list-select} {list}

In the list-select macro

  • if there is only one option to select from and store is set to checklist

  • then the column is handled as a checkbox

For further details - Example 11.