create new tag
, view all tags

DATATBL{"topic" format="..."} -- look up a table

  • Look up a table in the TWiki table markup on the specified topic. And then compose an ouput in the similar manner as SEARCH{...}.
  • Syntax: %DATATBL{ "topic" format="..." separator="..." }%
  • Parameters:
    Parameter Description Default
    "topics" comma separated topics whose first table is looked up. If multiple topics are specified, tables on the topics are combined and hanled as if there is one big table  
    "escaped_variable" Instead of comma separated topics, you can specify an escaped TWiki variable such as $percntINCLUDE{\"http://foo/bar\"}$percnt. Then the variable is expanded and the result becomes the data soruce. Read Getting table data dynamically for more information  
    assumedcols="COLUMNS" causes COLUMNS to be assumed. Read Referring to non-existent columns for more information  
    evalcell="on" causes variable expansion in table data. Read Expand variables in cells for more information off
    COLUMN_NAME="VALUES" select rows whose COLUMN_NAME column has either of comma separated VALUES. Read Select rows for more information  
    by="COLUMN_NAME" value="VALUES" Same as above. But if COLUMN_NAME starts with a lower case letter, this format needs to be used  
    ignorenull="on" causes null result to resort to ifnomatch value. Read Treat null value as no match for more information off
    ignorecase="on" causes string comparison to case insensitive off
    sorts the output chunks based on a source table column. sort is for case-sensitive string sort, sorta is for case-insensitive (alphabetical) string sort, and sortn is for numeric sort. The sorting result is in the ascending order. To get the decending order, specify reverse="on" in addition no sorting
    reverse="on" specifies the order of output chunks to be reversed. If combined with sort="COLUMN", output chunks are sorted in the descending order  
    limit="NUMBER" specifies the maximum number of rows selected no limit
    transposed="on" species that the topics have transposed tables - the first column has field names and the second column has field values. Read Transposed tables for more information off
    split="SPLIT_PATTERN" may be used when transposed="on" (above) is specified. It specifies a pattern to split tables even within a table  
    causes transliteration in the result. Read Transliteration for more information  
    format="..." specifies the format of each output chunk corresponding a selected source table row. Read Format parameter for more information $Name
    separator="..." specifies a separator between output chunks. This is the same as the separator parameter of SEARCH{...} (null string)
    separatorN="..." specifies a separator inserted every N output chunks. Read Different separators at different places for more information  
    ifnomatch="STRING" causes the STRING to be yielded when there is no matching row. Read When there is no match for more information  
  • Category: DevelopmentVariables, DatabaseAndFormsVariables, SearchingAndListingVariables
  • Related: DataTablePlugin, SEARCH, FormattedSearch
Edit | Attach | Watch | Print version | History: r5 < r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r5 - 2016-02-16 - HideyoImazu
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.